Class: Group
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Group
- Defined in:
- app/models/group.rb
Instance Method Summary collapse
Instance Method Details
#admins ⇒ Object
8 9 10 11 12 13 |
# File 'app/models/group.rb', line 8 def admins users = [] perms = Permission.where(:resource_type => 'Group', :resource => name, :action => 'edit').includes(:role => :users) perms.each { |p| users += p.role.users } users end |