Not readable? What do you want man, natural language?? : )
You can also use attr_protected and attr_readonly, e.g.
attr_readonly :address, :city, :zipcode
In general, the permission method only needs to be concerned with
stuff that changes according to the current user and stuff in the
database. For fields that are *always* protected, use attr_protected/
attr_accessible/attr_readonly.
I really like this idea:
> What about putting the permissions into the field declaration itself?
>
> fields do
> address :string, :except => :update
> city :string, :except => :update
> zipcode :string, :except => :update
> end
Except I think it should be a shorthand for protected / accessible /
readonly.
e.g.
address :string, :readonly
You could give :readonly, :protected or :accessible.
It would be an error to use both :accessible and :protected on the
same model (just as it is to use both attr_protected and
attr_accessible on the same model)
Like?
Tom
Love. Should I open a ticket?
Sure. And stop calling me Love : /
Tom
And my name is not Sure!
- Scott
(mad points to anyone who can name the movie)
idiocracy!