find
returns an array, so you cannot use update_all
.
To solve the problem, I think you can use where
, which returns an ActiveRecord::Relation
, so the update_all
should work:
User.where(:id =>[23,45,68,123]).update_all(:is_active => true)
http://apidock.com/rails/ActiveRecord/Relation/update_all
I hope it helps…