Sha256: a8bf8edc5a3831dd8ab4084bf2019b973c9034bf03100d63bfa8c1f99b8b0019
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
class User < ActiveRecord::Base self.table_name = "users" attr_accessible :email, :name, :password, :password_confirmation has_secure_password before_save {|user| user.email = email.downcase} validates :name, presence: true, length: {maximum: 49} VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i validates :email, presence: true, format: {with: VALID_EMAIL_REGEX}, uniqueness: {case_sensitive: false} validates :password, presence: true, length: {minimum: 3} validates :password_confirmation, presence: true end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
as_user-0.0.2 | app/models/user.rb |