Protecting fields from being changed

Luzzy
2007-10-14T04:03:20Z

Hi all,

I am familiar with attr_accessible.  But lately I have realised that
it doesnt do exactly what I want it to do.

Once a user is created on the system, I want to prevent the person
from changing their username.

I need username to be accessible on create... but after that I need it
to be protected.

Similarly - passwords need to be protected malicious form submits. I
don''t want peope to be able to change their password in a sneaky way
when, say, they submit a form to change their address.

Instead, passwords should only be changed after they submit a very
paticular form, and after they confirm the change through email.

Are there any ideas on how to lock down certain values in a model
after its initial creation?

thanks!