lib/detail_parser/railtie.rb in detail_parser-0.1.4 vs lib/detail_parser/railtie.rb in detail_parser-0.1.6

- old
+ new

@@ -3,21 +3,18 @@ require 'action_controller/log_subscriber' class DetailParser::Railtie < Rails::Railtie env = Rails.env.to_sym || :development - puts " ====== in Rails railtile" config.detail_parser = ActiveSupport::OrderedOptions.new config.detail_parser.enabled = false - # DetailParser::Logger.logger = Rails.application.config.logger || Rails.logger.presence - initializer 'detail parser logger', after: :load_config_initializers do - DetailParser::Logger.logger = Rails.application.config.logger || Rails.logger.presence - DetailParser::Logger.filter = ActionDispatch::Http::ParameterFilter.new Rails.application.config.filter_parameters + DetailParser.logger = Rails.application.config.logger || Rails.logger.presence + DetailParser.filter = ActionDispatch::Http::ParameterFilter.new Rails.application.config.filter_parameters end config.after_initialize do |app| - DetailParser.setup(app) + DetailParser.setup(app) if app.config.detail_parser.enabled end end