The If Works This dirt was a building before

AttrLocked

Table locking in AttrLocked

As promised, AttrLocked has been updated to include table locking. If you have any tables in your app that you want to be read-only, just put this in your model: class SomeReadOnlyTable < ActiveRecord::Base table_locked end That will stop and save/update/delete operations on the model’s table, and you won’t be able to modify the attributes [...]

AttrLocked updated

I’ve just made an update to AttrLocked. The initial release allowed you to carry on setting locked attributes using the record[:attr] = value style. Now, both that and record.attr = value are disabled on locked attributes. I may add a feature that lets you lock down a whole table so it’s read-only, and you cannot [...]

New Rails plugin: AttrLocked

I just released a new plugin for Rails, called AttrLocked. It lets you specify that certain model attributes should not be changeable once a record has been created – perfect for making sure usernames are fixed or your financial data doesn’t get tampered with. It will not let you change a record’s locked attributes in [...]