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



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

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

Instance Method Details

#camelize_title(role_title = self.title) ⇒ Object



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

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