diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/responder.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/responder.rb b/actionpack/lib/action_controller/metal/responder.rb index 6178a59029..0b2cee6868 100644 --- a/actionpack/lib/action_controller/metal/responder.rb +++ b/actionpack/lib/action_controller/metal/responder.rb @@ -1,3 +1,5 @@ +require 'active_support/json' + module ActionController #:nodoc: # Responder is responsible for exposing a resource to different mime requests, # usually depending on the HTTP verb. The responder is triggered when diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 107f70d3a3..330b950d7c 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -13,7 +13,7 @@ module ActionController def setup_subscriptions @partials = Hash.new(0) @templates = Hash.new(0) - ActiveSupport::Notifications.subscribe("action_view.slow_render_template") do |name, start, finish, id, payload| + ActiveSupport::Notifications.subscribe("action_view.render_template!") do |name, start, finish, id, payload| path = payload[:virtual_path] next unless path partial = path =~ /^.*\/_[^\/]*$/ @@ -28,7 +28,7 @@ module ActionController end def teardown_subscriptions - ActiveSupport::Notifications.unsubscribe("action_view.slow_render_template") + ActiveSupport::Notifications.unsubscribe("action_view.render_template!") end # Asserts that the request was rendered with the appropriate template file or partials |