Class: User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- User
- Defined in:
- app/models/user.rb
Constant Summary collapse
- ROLES_MASK =
Constant variable storing roles in the system
%w[developer admin moderator user]
- HUMANIZED_COLUMNS =
{ :email => 'E-mail' }
Class Method Summary collapse
-
.human_attribute_name(attribute) ⇒ Object
Allows us to easily humanize our attributes in one location so we don’t have to do it in every view.
Class Method Details
.human_attribute_name(attribute) ⇒ Object
Allows us to easily humanize our attributes in one location so we don’t have to do it in every view
41 42 43 |
# File 'app/models/user.rb', line 41 def self.human_attribute_name(attribute) HUMANIZED_COLUMNS[attribute.to_sym] || super end |