Module: AuthAssistant::RoleStrategy::RolesMask::ClassMethods
- Defined in:
- lib/auth_assistant/role_strategies/roles_mask.rb
Instance Method Summary collapse
Instance Method Details
#set_scope ⇒ Object
18 19 20 21 22 |
# File 'lib/auth_assistant/role_strategies/roles_mask.rb', line 18 def set_scope scope :with_role, lambda { |role| where("roles_mask & #{calc_index(role.to_s)} > 0") } end |