RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: cjazz007
Great tutorial! How do I validate an email from a specific domain before creating the new user? I tried :
validates_presence_of :email, :if => :in_co? validates_uniqueness_of :email, :if => :in_co?
def in_co? email == 'test@test.com' end
but it didn't do anything.
Thanks in advance!
Great tutorial! How do I validate an email from a specific domain before creating the new user? I tried :
validates_presence_of :email, :if => :in_co?
validates_uniqueness_of :email, :if => :in_co?
def in_co?
email == 'test@test.com'
end
but it didn't do anything.
Thanks in advance!