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.
- Host: GitHub
- URL: https://github.com/hunterae/update_fields
- Owner: hunterae
- Created: 2011-03-29T14:20:09.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-01-05T18:41:23.000Z (over 13 years ago)
- Last Synced: 2025-01-19T16:07:41.171Z (4 months ago)
- Language: Ruby
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
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")