update a lot of objects

Model.update_all 'active = true', 'your conditions'

http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M000999

Cheers,
Yuri