Skip to content

Instantly share code, notes, and snippets.

@ilake
Created March 10, 2010 02:40
Show Gist options
  • Save ilake/327445 to your computer and use it in GitHub Desktop.
Save ilake/327445 to your computer and use it in GitHub Desktop.
def using_open_id?
!identity_url.blank?
end
validates_presence_of :identity_url, :if => using_open_id?
validates_presence_of :username, :unless => using_open_id?
validates_presence_of :password, :unless => using_open_id?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment