diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/integration.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index 1a0fa8b7b6..f22f7a0250 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -332,9 +332,11 @@ module ActionController def clear_last_instantiation! self.last_instantiation = nil end - + def new_with_capture(*args) - self.last_instantiation ||= new_without_capture(*args) + controller = new_without_capture(*args) + self.last_instantiation ||= controller + controller end end end |