Skip to content

Instantly share code, notes, and snippets.

@jwood
Created July 10, 2015 13:57
Show Gist options
  • Save jwood/18e52070059e1eb6490c to your computer and use it in GitHub Desktop.
Save jwood/18e52070059e1eb6490c to your computer and use it in GitHub Desktop.
Rails uniqueness validation
class Account < ActiveRecord::Base
validates :email, uniqueness: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment