I'm not sure if my answer is right, just trying to help.
I think you can take advantage of this issue . If I change the accepted answer to your question, it will look like ( DISCLAIMER : I could not verify the following codes, since env is not ready on the computer I am currently working on)
validates :email, :presence => {:message => 'cannot be blank.', :if => :email_required? }, :allow_blank => true, :format => { :with => /\A[A-Za-z0-9._%+-] +@ [A-Za-z0-9.-]+\.[A-Za-z]+\z/, :message => 'address is not valid. Please, fix it.' }, :uniqueness => true def email_required?
Are you updating the email_required? method email_required? to determine if he is from twitter or not! If from twitter, return false, otherwise true.
I believe you need to use the same :if for: validation validator. otherwise it will happen. Although, I'm also not sure :(. Sorry
source share