diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index ddb2e506..35e6b709 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -EVENTS_PER_PAGE = 3 +EVENTS_PER_PAGE = Rails.configuration.conference[:events_per_page] class ConferencesController < ApplicationController include ConferenceHelper diff --git a/app/helpers/conference_helper.rb b/app/helpers/conference_helper.rb index c392a814..0db00eeb 100644 --- a/app/helpers/conference_helper.rb +++ b/app/helpers/conference_helper.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true -DEFAULT_LOGO = 'snapcon_logo.png' -DEFAULT_COLOR = '#0B3559' +DEFAULT_LOGO = Rails.configuration.conference[:default_logo] +DEFAULT_COLOR = Rails.configuration.conference[:default_color] module ConferenceHelper # Return true if only call_for_papers or call_for_tracks or call_for_booths is open diff --git a/app/mailers/mailbot.rb b/app/mailers/mailbot.rb index 2f9d1f77..48eeca7c 100644 --- a/app/mailers/mailbot.rb +++ b/app/mailers/mailbot.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -SNAPCON_BCC_ADDRESS = 'messages@snap.berkeley.edu' -EMAIL_TEMPLATE = 'email_template' -YTLF_TICKET_ID = 50 +SNAPCON_BCC_ADDRESS = Rails.configuration.mailbot[:bcc_address] +EMAIL_TEMPLATE = Rails.configuration.mailbot[:email_template] +YTLF_TICKET_ID = Rails.configuration.mailbot[:ytlf_ticket_id] class Mailbot < ActionMailer::Base helper ConferenceHelper diff --git a/config/application.rb b/config/application.rb index 18f917aa..d8a8930b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -66,6 +66,18 @@ module Osem config.active_job.queue_adapter = :delayed_job + config.conference = { + events_per_page: 3, + default_logo: 'snapcon_logo.png', + default_color: '#0B3559' + } + + config.mailbot = { + bcc_address: 'messages@snap.berkeley.edu', + email_template: 'email_template', + ytlf_ticket_id: 50 + } + config.before_configuration do env_file = File.join(Rails.root, 'config', 'local_env.yml') if File.exist?(env_file)