Luke I. wrote:
Jason R. wrote:
Curious. What kind of environment are you developing in that you can’t
other developers to know what’s up and to not try something stupid? It’s
like the regular user can do anything to the model as such.
I’m not developing in an environment where I can’t trust the other
developers to not do something stupid: I am, however, cautious by
nature, and would rather know with absolute certainty that they can’t
do something stupid, than hope that they don’t.
Now that I’m playing with it, I’m not 100% sure that it’s possible to
make this method protected:
If I try a call to protected (protected :encrypted_password=), that
doesn’t work… it tells me that the function doesn’t exist. Even more
revelatory of my predicament is the fact that ‘alias_method password
encrypted_password’ tells me encrypted_password is an undefined
These functions aren’t being defined when I think they are, or I’m doing
something completely incorrectly.
If I try to define my own function for encrypted_password= as a
protected function, that is somehow being over-written by AR, because I
can then blithely call user.encrypted_password= without it throwing a