Skip to content

Instantly share code, notes, and snippets.

@bsimpson
Created June 20, 2013 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsimpson/5826663 to your computer and use it in GitHub Desktop.
Save bsimpson/5826663 to your computer and use it in GitHub Desktop.
Xor custom validation
validate :foo
def foo
errors[:base] << 'Nope' unless true ^ true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment