Module: Zuul::ActiveRecord::Role::InstanceMethods
- Defined in:
- lib/zuul/active_record/role.rb
Instance Method Summary collapse
-
#assigned_contexts ⇒ Object
Returns a list of contexts within which the role has been assigned to subjects.
Instance Method Details
#assigned_contexts ⇒ Object
Returns a list of contexts within which the role has been assigned to subjects
38 39 40 41 42 |
# File 'lib/zuul/active_record/role.rb', line 38 def assigned_contexts auth_scope do send(role_subject_plural_key).group(:context_type, :context_id).map(&:context) end end |