Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

CJ's Profile

GitHub User: cjazz007

Comments by CJ

Avatar

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!