Class: Guts::Authorization
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Guts::Authorization
- Defined in:
- app/models/guts/authorization.rb
Overview
Authorizations model
Instance Method Summary collapse
-
#class_with_action ⇒ Object
Shows a class with an action.
-
#class_with_action_cleaner ⇒ Object
Shows a cleaner class with an action.
Instance Method Details
#class_with_action ⇒ Object
Shows a class with an action
12 13 14 15 16 17 |
# File 'app/models/guts/authorization.rb', line 12 def class_with_action string = "#{self[:subject_class]} (#{self[:action]})" string << " for ID: #{self[:subject_id]}" if self[:subject_id] string end |
#class_with_action_cleaner ⇒ Object
Shows a cleaner class with an action
21 22 23 |
# File 'app/models/guts/authorization.rb', line 21 def class_with_action_cleaner class_with_action.gsub(/Guts::/, '').titleize end |