Class: Users::RoleServices
- Inherits:
-
Lesli::ApplicationLesliService
- Object
- Lesli::ApplicationLesliService
- Users::RoleServices
- Defined in:
- app/services/lesli_audit/users/role_services.rb
Instance Method Summary collapse
-
#index ⇒ Hash
Paginated list of the records.
Instance Method Details
#index ⇒ Hash
Returns Paginated list of the records.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'app/services/lesli_audit/users/role_services.rb', line 41 def index current_user.account.roles .joins(" inner join ( select role_id, count(1) as users from user_roles ur group by role_id ) ur on ur.role_id = roles.id " ).select( "roles.id", "roles.name", "roles.active", "roles.object_level_permission", "ur.users" ) end |