Displaying 1 result from an estimated 1 matches for "passport_verifi".
Did you mean:
passport_verified
2009 Mar 02
0
Implementing conditional read-only attributes of ActiveRecord objects
...in
attr_protected, attr_readonly and possibly other attribute methods in
ActiveRecord objects.
Rationale (example):
class User < AR:Base
# User should not be able to modify fields any more once they have
been verified
attr_readonly :firstname, :lastname, :gender_id, :birthdate, :if
=> :passport_verified?
# ...
end
or, even better yet, attr_protected with the same options, since this
will allow an admin controller to directly write the attributes while
the "normal" user forms will just ignore them.
The ":if" option should, like in validations, accept a Proc, String,
Symbol...