Rebuild rubocop TODOs after auto-correcting

This commit is contained in:
James Mason 2018-04-04 10:18:51 -07:00
parent 31c50255e9
commit 84dbb52d11
No known key found for this signature in database
GPG key ID: 1B3951886C449023
580 changed files with 3689 additions and 3133 deletions

View file

@ -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