Clearer still

This commit is contained in:
David Heinemeier Hansson
2025-04-15 16:04:11 +02:00
parent 5d22809e29
commit 8e479dddba
+1 -1
View File
@@ -5,7 +5,7 @@ module User::Role
enum :role, %i[ admin member system ].index_by(&:itself), scopes: false
scope :member, -> { where(role: :member) }
scope :active, -> { where(active: true).where.not(role: :system) }
scope :active, -> { where(active: true, role: %i[ admin member ]) }
end
class_methods do