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/commands/runner.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties/lib/rails/commands/runner.rb') diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index e8cc5d9e3b..a694218695 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -42,6 +42,7 @@ ENV["RAILS_ENV"] = options[:environment] require APP_PATH Rails.application.require_environment! + Rails.application.load_runner if code_or_file.nil? $stderr.puts "Run '#{$0} -h' for help." -- cgit v1.2.3