Class: Faalis::Permission
- Inherits:
-
Object
- Object
- Faalis::Permission
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- app/models/faalis/permission.rb
Instance Method Summary collapse
- #id_repr ⇒ Object
- #model_name ⇒ Object
-
#to_s ⇒ Object
alias_method :action, :permission_type.
Instance Method Details
#id_repr ⇒ Object
34 35 36 |
# File 'app/models/faalis/permission.rb', line 34 def id_repr "#{self..to_s}|#{self.model}" end |
#model_name ⇒ Object
38 39 40 |
# File 'app/models/faalis/permission.rb', line 38 def model_name model.underscore.humanize end |
#to_s ⇒ Object
alias_method :action, :permission_type
29 30 31 32 |
# File 'app/models/faalis/permission.rb', line 29 def to_s t('permission_string', action: t(self..to_s), model: t(self.model.underscore.humanize)) end |