Possible Duplicate:
Skip email validation for omniauth-twitter on devise 2.0
I am using this validation rules for email:
validates :email,
:presence => true,
:format => { :with => VALID_EMAIL_REGEX },
:uniqueness => {:case_sensitive => false }
before_save do |user|
user.email = email.downcase#
user.slug = user.username.parameterize
end
And I tried to add:
def email_required?
super && provider.blank?
end
For skipping email validation, if a visitor want to sign up through Twitter, but I am still getting error here, it looks that the email_required?
doesn't work.
What am I missing?
Thank you