Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Ensures Immutability Of

Ensures Immutability Of

There are many cases where a model attribute should not be changed once it’s set. This plugin makes it dead simple.

Example

class Account < ActiveRecord::Base ensures_immutability_of :username, :email end

account = Account.create(:username => ‘jgreen’) ... account.update(:username => ‘jgreen’) # raises RuntimeError

Copyright© 2007 Wesley Moxam – Savvica Inc, released under the MIT license

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'