Re: Protecting fields from being changed

gene tani
2007-10-14T14:19:32Z

On Oct 14, 12:45 am, Luzzy
<luzer...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> with before_update
>
> is the idea that i check the submitted fields and throw an exception
> if a protected field is given for an existing record?
>
> is there a clean way to do this already explored?

I haven''t tested this, but i think for the fields /columns you want
write-once, you just return false/nil.

Also, there''s this, and attr_readonly, but I haven''t figured
out how