On Jun 6, 2007, at 2:02 PM, Jon wrote:
>
> Hello,
>
> I am new to RoR. I have situation that cannot find solution. I use the
> same user model for signup to system and edit user profile. How to
> make username field just insertable and not updatable? Is it possible
> to restrict this in model?
Yes, with validations. You can have different validations rules for
create and update.
http://api.rubyonrails.com/classes/ActiveRecord/Validations.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---