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/engine.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'railties/lib/rails/engine.rb') diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 993dfe43ee..77f335e45f 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -430,6 +430,11 @@ module Rails super end + def load_runner(app=self) + railties.all { |r| r.load_runner(app) } + super + end + def eager_load! railties.all(&:eager_load!) -- cgit v1.2.3