RailsCasts Pro episodes are now free!

Learn more or hide this

Sam Soffes's Profile

GitHub User: soffes

Site: http://samsoff.es

Comments by Sam Soffes

Avatar

In Rails 4, this:

ruby
Product.update_all({discontinued: true}, {id: params[:product_ids]})

should be:

ruby
Product.where(id: params[:product_ids]).update_all(discontinued: true)