We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e7454f commit d88be54Copy full SHA for d88be54
app/admin/user.rb
@@ -16,6 +16,9 @@
16
redirect_to action: :index
17
end
18
19
+ scope :all
20
+ scope :without_memberships
21
+
22
index do
23
selectable_column
24
column do |user|
app/models/user.rb
@@ -38,6 +38,7 @@ class User < ApplicationRecord
38
accepts_nested_attributes_for :members, allow_destroy: true
39
40
default_scope { order("users.id ASC") }
41
+ scope :without_memberships, -> { where.missing(:members) }
42
scope :actives, -> { joins(:members).where(members: { active: true }) }
43
scope :online_active, -> { where("sign_in_count > 0") }
44
scope :notifications, -> { where(notifications: true) }
0 commit comments