This RubyGem and Rails plugin adds a ‘validates_constancy_of’ validation to Active Record. It allows you to prevent particular database fields from being changed after a record is created. A validation error occurs on updates if an attribute of a model object is different from its value in the database.
The code is packaged as both a RubyGem and a Rails plugin. You can use either one, depending on what your needs are.
NOTE: This project is no longer in active development. It has been superseded by the built-in attr_readonly method in Rails.