Add unregistered speakers scope to program
And use it in Conference#registration_limit_exceeded? Also change self.registered(conference) to registered(conference) to fix failures in linters
This commit is contained in:
parent
e5948698db
commit
979377f2df
2 changed files with 5 additions and 1 deletions
|
|
@ -719,7 +719,7 @@ class Conference < ApplicationRecord
|
|||
# * +True+ -> If the registration limit has been reached or exceeded
|
||||
# * +False+ -> If the registration limit hasn't been exceeded
|
||||
def registration_limit_exceeded?
|
||||
registration_limit > 0 && registrations.count + program.speakers.confirmed.count - program.speakers.confirmed.registered(program.conference).count >= registration_limit
|
||||
registration_limit > 0 && registrations.count + program.speakers.confirmed.unregistered(program.conference).count >= registration_limit
|
||||
end
|
||||
|
||||
# Returns an hexadecimal color given a collection. The returned color changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue