Line up scopes in order of the flow
This commit is contained in:
@@ -6,10 +6,9 @@ module Card::Engageable
|
||||
included do
|
||||
has_one :engagement, dependent: :destroy, class_name: "Card::Engagement"
|
||||
|
||||
scope :doing, -> { published.active.joins(:engagement) }
|
||||
scope :considering, -> { published_or_drafted_by(Current.user).active.where.missing(:engagement) }
|
||||
|
||||
scope :stagnated, -> { doing.where(last_active_at: ..STAGNATED_AFTER.ago) }
|
||||
scope :doing, -> { published.active.joins(:engagement) }
|
||||
scope :stagnated, -> { doing.where(last_active_at: ..STAGNATED_AFTER.ago) }
|
||||
end
|
||||
|
||||
class_methods do
|
||||
|
||||
Reference in New Issue
Block a user