Class: Role
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Role
- Defined in:
- app/models/role.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.[](title) ⇒ Object
12 13 14 |
# File 'app/models/role.rb', line 12 def self.[](title) find_or_create_by_title(title.to_s.camelize) end |
Instance Method Details
#camelize_title(role_title = self.title) ⇒ Object
8 9 10 |
# File 'app/models/role.rb', line 8 def camelize_title(role_title = self.title) self.title = role_title.to_s.camelize end |