On Aug 17, 6:33 pm, Pål Bergström <[email protected]>
wrote:
> Frederick Cheung wrote:
> > On Aug 17, 6:22 pm, P l Bergstr m <[email protected]>
> > wrote:
> >> Is this right?
>
> >> validates_uniqueness_of :email, :message => "Email taken", :unless =>
> >> :email == '[email protected]'
>
> > no. :unless must be the name of a method that returns whether or not
> > to run the validation
>
> > Fred
>
> How would I write a condition that doesn't check the uniqueness of a
> mail address if the address is '[email protected]'

you write a method that returns true if the email is that magic value

Fred
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to