Skip to content

Commit eaf5e49

Browse files
authored
Merge pull request #89 from tokyorubykaigi12/fix-sold-out
Plan#sold_out?: Properly respect Plan capacity
2 parents 212dbb6 + 010d721 commit eaf5e49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/plan.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def available?(t = Time.zone.now)
1515
end
1616

1717
def sold_out?
18-
!capacity || sponsorships.active.count > capacity
18+
!capacity || sponsorships.active.count >= capacity
1919
end
2020

2121
def closed?(t = Time.zone.now)

0 commit comments

Comments
 (0)