hey,
I do some validation in my user.rb file when a user signing up
validates_presence_of :password
now, when the user want to edit its account, I dont want that the
password is checked anymore - how can I do that?
I need the validation only in the signup process but not in the account
editing process?
pete
If you only want to validate when the record is first created, you can
add:
:on => :create
to your helper, like this:
validates_presence_of :password, :on => :create
On subsequent record updates that validation will not be called.
/afb
Pete C. wrote:
hey,
I do some validation in my user.rb file when a user signing up
validates_presence_of :password
now, when the user want to edit its account, I dont want that the
password is checked anymore - how can I do that?
I need the validation only in the signup process but not in the account
editing process?
pete