No public use of this concept, so inline it

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