An open API service indexing awesome lists of open source software.

https://github.com/hunterae/update_fields

update-fields provides convience methods for running an atomic update on a single field or multiple fields in a database row.
https://github.com/hunterae/update_fields

Last synced: 3 months ago
JSON representation

update-fields provides convience methods for running an atomic update on a single field or multiple fields in a database row.

Awesome Lists containing this project

README

        

= 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")