Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User < ActiveRecord::Base
- has_many :cash_flows, :dependent => :destroy
- has_many :tags, :dependent => :destroy
- has_secure_password(validations: false)
- validates_presence_of :nick, :password
- validates_confirmation_of :password
- validates_uniqueness_of :nick, case_sensitive: false
- validates_length_of :nick, minimum: 2, maximum: 64
- validates_length_of :password, minimum: 6
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement