Class: Guts::User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Guts::User
- Defined in:
- app/models/guts/user.rb
Overview
User model
Constant Summary collapse
- VALID_EMAIL_REGEX =
Regex to test email against for validation
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
Instance Method Summary collapse
-
#ability ⇒ Class
Gets the user’s abilties.
-
#email=(email) ⇒ String
Setter override for email to downcase and strip email before database.
Instance Method Details
#ability ⇒ Class
Gets the user’s abilties
40 41 42 |
# File 'app/models/guts/user.rb', line 40 def ability @ability ||= Guts::Ability.new self end |
#email=(email) ⇒ String
Setter override for email to downcase and strip email before database
33 34 35 |
# File 'app/models/guts/user.rb', line 33 def email=(email) self[:email] = email.downcase.strip end |