You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
323 B

4 months ago
  1. return unless defined?(Rails::Server)
  2. require Rails.root.join('lib', 'hot_constants', 'hot_constants')
  3. HotConstants.on_change(:log_active_record) { |bool| ActiveRecord::Base.logger.level = bool ? :debug : :fatal }
  4. HotConstants.on_change(:log_action_view) { |bool| ActionView::Base.logger.level = bool ? :debug : :fatal }