Let\'s suppose I have a table called \'user_products\' and a corresponding model called UserProduct in my Rails application. I also have a field called \'is_temporary\' in my ta
This is an old post. I updated this in case someone checks it :) (Rails 4)
DEPRECATION: Relation#update_all with conditions is deprecated. Please use Item.where(color: 'red').update_all(...) rather than Item.update_all(..., color: 'red').
So the query will be
UserProduct.where(:user_id => 12345).update_all(:is_temporary => false)
Cheers