Class: Tuttle::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/tuttle/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#check_reload_statusObject



7
8
9
10
11
12
13
14
# File 'app/controllers/tuttle/application_controller.rb', line 7

def check_reload_status
  return unless Tuttle::Engine.reload_needed && !Rails.configuration.eager_load
  Tuttle::Engine.logger.warn('Eager-loading application')
  ActiveSupport::Notifications.instrument 'tuttle.perform_eager_load' do
    Rails.application.eager_load!
    Tuttle::Engine.reload_needed = false
  end
end