RailsCasts Pro episodes are now free!

Learn more or hide this

Mohamed Sami's Profile

GitHub User: melsatar

Comments by Mohamed Sami

Avatar

undefined method `valid?' for 2:Fixnum

I'm getting this error blocked in here, do you have any suggestion, i'm using rails 4

def save
if imported_departments.map(&:valid?).all?
imported_departments.each(&:save!)
true
else