Rebuild rubocop TODOs after auto-correcting
This commit is contained in:
parent
31c50255e9
commit
84dbb52d11
580 changed files with 3689 additions and 3133 deletions
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Registration < ApplicationRecord
|
||||
require 'csv'
|
||||
belongs_to :user
|
||||
|
|
@ -9,7 +11,7 @@ class Registration < ApplicationRecord
|
|||
has_many :events_registrations
|
||||
has_many :events, through: :events_registrations, dependent: :destroy
|
||||
|
||||
has_paper_trail ignore: %i(updated_at week), meta: { conference_id: :conference_id }
|
||||
has_paper_trail ignore: %i[updated_at week], meta: { conference_id: :conference_id }
|
||||
|
||||
accepts_nested_attributes_for :user
|
||||
accepts_nested_attributes_for :qanswers
|
||||
|
|
@ -64,9 +66,7 @@ class Registration < ApplicationRecord
|
|||
end
|
||||
|
||||
def send_registration_mail
|
||||
if conference.email_settings.send_on_registration?
|
||||
Mailbot.registration_mail(conference, user).deliver_later
|
||||
end
|
||||
Mailbot.registration_mail(conference, user).deliver_later if conference.email_settings.send_on_registration?
|
||||
end
|
||||
|
||||
def set_week
|
||||
|
|
@ -77,8 +77,6 @@ class Registration < ApplicationRecord
|
|||
end
|
||||
|
||||
def registration_limit_not_exceed
|
||||
if conference.registration_limit > 0 && conference.registrations(:reload).count >= conference.registration_limit
|
||||
errors.add(:base, 'Registration limit exceeded')
|
||||
end
|
||||
errors.add(:base, 'Registration limit exceeded') if conference.registration_limit > 0 && conference.registrations(:reload).count >= conference.registration_limit
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue