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 EmailSettings < ApplicationRecord
|
||||
belongs_to :conference
|
||||
|
||||
|
|
@ -11,12 +13,15 @@ class EmailSettings < ApplicationRecord
|
|||
'conference_start_date' => conference.start_date,
|
||||
'conference_end_date' => conference.end_date,
|
||||
'registrationlink' => Rails.application.routes.url_helpers.conference_conference_registration_url(
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000')),
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000')
|
||||
),
|
||||
'conference_splash_link' => Rails.application.routes.url_helpers.conference_url(
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000')),
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000')
|
||||
),
|
||||
|
||||
'schedule_link' => Rails.application.routes.url_helpers.conference_schedule_url(
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000'))
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000')
|
||||
)
|
||||
}
|
||||
|
||||
if conference.program.cfp
|
||||
|
|
@ -43,12 +48,11 @@ class EmailSettings < ApplicationRecord
|
|||
if event
|
||||
h['eventtitle'] = event.title
|
||||
h['proposalslink'] = Rails.application.routes.url_helpers.conference_program_proposals_url(
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000'))
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000')
|
||||
)
|
||||
end
|
||||
|
||||
if booth
|
||||
h['booth_title'] = booth.title
|
||||
end
|
||||
h['booth_title'] = booth.title if booth
|
||||
h
|
||||
end
|
||||
|
||||
|
|
@ -71,8 +75,8 @@ class EmailSettings < ApplicationRecord
|
|||
|
||||
def parse_template(text, values)
|
||||
values.each do |key, value|
|
||||
if value.kind_of?(Date)
|
||||
text = text.gsub "{#{key}}", value.strftime('%Y-%m-%d') unless text.blank?
|
||||
if value.is_a?(Date)
|
||||
text = text.gsub "{#{key}}", value.strftime('%Y-%m-%d') if text.present?
|
||||
else
|
||||
text = text.gsub "{#{key}}", value unless text.blank? || value.blank?
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue