Feedback for plugin: acts_as_readonly

All,
I’m just announcing and looking for feedback for a quick little
plugin I wrote: acts_as_readonly (kevincolyar (Kevin Colyar) · GitHub
acts_as_readonly/tree/master)

Some info:

ActsAsReadonly

acts_as_readonly is an ActiveRecord plugin that makes a model
readonly, preventing its attributes from being set and calling methods
like save, create, and destroy on it.

This plugin is useful for working with risky, legacy or third party
database where data is only being viewed.

Example

class MyModel < ActiveRecord::Base
acts_as_readonly
end

Installation

$ ./script/plugin install [email protected]:kevincolyar/
acts_as_readonly.git

Thanks,
Kevin

Why not use ActiveRecord’s readonly!() feature while fetching the
record instead?

Readonly <> immutable in memory in my opinion. I don’t see why you
need to raise exceptions for column assignments as long as they are
not stored back to the database.

On May 28, 5:30 am, “[email protected][email protected]