On Wed, 4 Mar 2009 10:13:28 -0800 (PST)
sbtodd <[email protected]> wrote:

> 
> Is there a way to validate only on the creationg of a record?
> 
> For instance, in a User model I would like to avoid these validations
> when I update a User record:
> 
> validates_present :password_confirmation
> validates_is_confirmed :password

Hey

Check out http://www.datamapper.org/doku.php?id=docs:validations

Most specifically ':if => :new_record?'

Regards,
Jon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to