UpdateFields¶ ↑
Run atomic updates on a single field or multiple fields of a activerecord model
Installation¶ ↑
Rails 3.0¶ ↑
Add the following to your Gemfile:
gem 'update-fields'
Usage¶ ↑
@database_model.update_fields(:field1 => "some value", :field2 => 2, :field3 => true)
or
@database_model.update_field(:balance, "balance - 100")