From 38af3540ae53b9f2fbdb649a68cde3edf182fe67 Mon Sep 17 00:00:00 2001 From: kennyj Date: Tue, 29 May 2012 23:31:27 +0900 Subject: backport runner fixes to 3-2-stable Add a runner hook to Rails::Application and Rails::Engine that requires ActiveRecord::Base to avoid circular constant loading when using observers. This commit backports cc7dd66, c0ba0f0 and 8d01c61. --- railties/lib/rails/application.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'railties/lib/rails/application.rb') diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 854ac2cbbc..cc53009e80 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -154,6 +154,14 @@ module Rails self end + # Load the application runner and invoke the registered hooks. + # Check Rails::Railtie.runner for more info. + def load_runner(app=self) + initialize_runner + super + self + end + # Rails.application.env_config stores some of the Rails initial environment parameters. # Currently stores: # @@ -305,6 +313,9 @@ module Rails require "rails/console/helpers" end + def initialize_runner #:nodoc: + end + def build_original_fullpath(env) path_info = env["PATH_INFO"] query_string = env["QUERY_STRING"] -- cgit v1.2.3