Class: Refinery::Role

Inherits:
Core::BaseModel
  • Object
show all
Defined in:
app/models/refinery/role.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](title) ⇒ Object



13
14
15
# File 'app/models/refinery/role.rb', line 13

def self.[](title)
  find_or_create_by_title(title.to_s.camelize)
end

Instance Method Details

#camelize_title(role_title = self.title) ⇒ Object



9
10
11
# File 'app/models/refinery/role.rb', line 9

def camelize_title(role_title = self.title)
  self.title = role_title.to_s.camelize
end