/activeupdate

ActiveRecord extension to facilitate updating multiple records in one transaction

Primary LanguageRuby

ActiveUpdate

Installation

gem install activeupdate

currently, the following is also required to be bundled:

gem 'arel', github: 'rails/arel', branch: 'master'

Usage

# Updating multiple records
resources= { 
  0 => { 'attribute' => 'test' }, 
  1 => { 'attribute' => 'cheese' } 
}

Model.update!(resources.keys, resources.values)

YARDocs

You can view the activeupdate documentation in YARDoc format here.

Versioning

http://semver.org

with inspiration courtesy of @danieljacobarcher