lib/combustion/application.rb in combustion-1.1.2 vs lib/combustion/application.rb in combustion-1.2.0
- old
+ new
@@ -4,10 +4,17 @@
require "digest"
Rails.env = ENV["RAILS_ENV"] || "test"
module Combustion
class Application < Rails::Application
+ CONFIGURERS = [
+ Combustion::Configurations::ActiveRecord,
+ Combustion::Configurations::ActionController,
+ Combustion::Configurations::ActionMailer,
+ Combustion::Configurations::ActiveStorage
+ ].freeze
+
version = Rails.version.to_f
# Core Settings
config.cache_classes = true
config.consider_all_requests_local = true
@@ -24,12 +31,10 @@
# default. Instead, wait for this method to be invoked (to get around
# load-order complications).
def self.configure_for_combustion
config.root = File.expand_path File.join(Dir.pwd, Combustion.path)
- Combustion::Configurations::ActiveRecord.call config
- Combustion::Configurations::ActionController.call config
- Combustion::Configurations::ActionMailer.call config
+ CONFIGURERS.each { |configurer| configurer.call config }
config.assets.enabled = true if defined?(Sprockets)
end
initializer(