Skip to content

Instantly share code, notes, and snippets.

@GiancarlosIO
Last active July 28, 2016 03:59
Show Gist options
  • Save GiancarlosIO/1972cfee6a4bc98ed6a70245f17623fe to your computer and use it in GitHub Desktop.
Save GiancarlosIO/1972cfee6a4bc98ed6a70245f17623fe to your computer and use it in GitHub Desktop.
# my_api/app/models/user.rb
class User < ActiveRecord::Base
validates :email, presence: true, uniqueness: true
validates :name, presence: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment