Module: Sunrise::Models::Role::ClassMethods
- Defined in:
- lib/sunrise/models/role.rb
Class Method Summary collapse
Class Method Details
.extended(base) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/sunrise/models/role.rb', line 11 def self.extended(base) base.class_eval do belongs_to :user enumerated_attribute :role_type, :id_attribute => :role_type attr_accessible :role_type scope :with_type, lambda { |role_type| where(:role_type => role_type) } end end |