Class: Refinery::Authentication::Devise::Role

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.[](title) ⇒ Object



16
17
18
# File 'app/models/refinery/authentication/devise/role.rb', line 16

def self.[](title)
  where(:title => title.to_s.camelize).first_or_create!
end

Instance Method Details

#camelize_title(role_title = self.title) ⇒ Object



12
13
14
# File 'app/models/refinery/authentication/devise/role.rb', line 12

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