Created
March 28, 2019 11:32
-
-
Save MaryKuz/7c9c45dc0271a5c89115d8358e3ebf95 to your computer and use it in GitHub Desktop.
Write validations in the model User
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
has_secure_password | |
validates :name, presence: true | |
validates :email, presence: true, uniqueness: { case_sensitive: false }, email: true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment