mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
users list: display only active members
This commit is contained in:
parent
c8e9c6dae5
commit
820d8bba53
@ -166,7 +166,8 @@ class API::MembersController < API::ApiController
|
||||
end
|
||||
|
||||
@members = User.includes(:profile, :group)
|
||||
.joins(:profile, :group, 'LEFT JOIN "subscriptions" ON "subscriptions"."user_id" = "users"."id" LEFT JOIN "plans" ON "plans"."id" = "subscriptions"."plan_id"')
|
||||
.joins(:profile, :group, :roles, 'LEFT JOIN "subscriptions" ON "subscriptions"."user_id" = "users"."id" LEFT JOIN "plans" ON "plans"."id" = "subscriptions"."plan_id"')
|
||||
.where("users.is_active = 'true' AND roles.name = 'member'")
|
||||
.order("#{order_key} #{direction}")
|
||||
.page(p[:page])
|
||||
.per(p[:size])
|
||||
|
Loading…
x
Reference in New Issue
Block a user