Forum: Ruby on Rails Feedback for plugin: acts_as_readonly

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2009-05-28 04:30
(Received via mailing list)
All,
  I'm just announcing and looking for feedback for a quick little
plugin I wrote: acts_as_readonly (http://github.com/kevincolyar/
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 removed_email_address@domain.invalid:kevincolyar/
acts_as_readonly.git

Thanks,
  Kevin
Mukund (Guest)
on 2009-05-28 14:20
(Received via mailing list)
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, "removed_email_address@domain.invalid" 
<removed_email_address@domain.invalid>
This topic is locked and can not be replied to.