Forum: Ruby on Rails valdate_presnce_of email, :if => :validate_id + Factory girl

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sijo k. (Guest)
on 2009-06-02 09:00
Hi
    In the model I have User
attr_accessor :validate_email_id
validates_presence_of :email ,:if => :validate_email_id
  Could anybody please tell me how can I define a Factory for the above?

Thanks in advance
Sijo
Mukund (Guest)
on 2009-06-02 10:37
(Received via mailing list)
Move that to a module and include it as a mixin in your model?
Mukund (Guest)
on 2009-06-02 10:39
(Received via mailing list)
N/M. Realized that you were talking about the factory-girl gem.
Sijo k. (Guest)
on 2009-06-02 10:49
Mukund wrote:
> Move that to a module and include it as a mixin in your model?
   Did not understand this.Could you please  elaborate?
Sijo
This topic is locked and can not be replied to.