Stop using reload argument in associations
Deprecated force reload argument in association readers is deprecated
and has been removed in Rails 5.1:
09cac8c67a
This commit is contained in:
parent
55edd8a571
commit
b3716985f0
1 changed files with 1 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ class Registration < ApplicationRecord
|
|||
end
|
||||
|
||||
def registration_limit_not_exceed
|
||||
if conference.registration_limit > 0 && conference.registrations(:reload).count >= conference.registration_limit
|
||||
if conference.registration_limit > 0 && conference.registrations.count >= conference.registration_limit
|
||||
errors.add(:base, 'Registration limit exceeded')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue