Skip to content

Commit

Permalink
Add scope for not completed allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Mar 6, 2025
1 parent 87bbeb2 commit ef8966b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Allocation < ApplicationRecord

scope :displayable, -> { where('funded_projects_count > 0') }
scope :completed, -> { where.not(completed_at: nil) }
scope :not_completed, -> { where(completed_at: nil) }

validates_uniqueness_of :slug, scope: :fund_id

Expand Down

0 comments on commit ef8966b

Please sign in to comment.