Update table with ActiveRecord


#1

How do i do an “update posts set home=1” with ActiveRecord?


#2

sorry. a peek into the API gave me the solution.

Post.update_all(:home=>1)