diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/railties/subscriber.rb | 4 | ||||
-rw-r--r-- | actionpack/test/controller/subscriber_test.rb | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/railties/subscriber.rb b/actionpack/lib/action_controller/railties/subscriber.rb index c21305ac8f..0556c6b40e 100644 --- a/actionpack/lib/action_controller/railties/subscriber.rb +++ b/actionpack/lib/action_controller/railties/subscriber.rb @@ -6,7 +6,7 @@ module ActionController request = controller.request info "\nProcessed #{controller.class.name}##{event.payload[:action]} " \ - "to #{request.formats} (for #{request.remote_ip} at #{event.time.to_s(:db)}) " \ + "to #{request.formats.join(', ')} (for #{request.remote_ip} at #{event.time.to_s(:db)}) " \ "[#{request.method.to_s.upcase}]" params = controller.send(:filter_parameters, request.params) @@ -37,7 +37,7 @@ module ActionController end def redirect_to(event) - info "Redirected to #{event.payload[:location]} with status #{event.payload[:status]}" + info "Redirected to #{event.payload[:location]}" end def send_data(event) diff --git a/actionpack/test/controller/subscriber_test.rb b/actionpack/test/controller/subscriber_test.rb index b2888dc4c2..ef1a325799 100644 --- a/actionpack/test/controller/subscriber_test.rb +++ b/actionpack/test/controller/subscriber_test.rb @@ -70,6 +70,13 @@ module ActionControllerSubscriberTest assert_match /Processed\sAnother::SubscribersController#show/, logs[0] end + def test_process_action_formats + get :show + wait + assert_equal 2, logs.size + assert_match /text\/html/, logs[0] + end + def test_process_action_without_parameters get :show wait @@ -116,7 +123,7 @@ module ActionControllerSubscriberTest wait assert_equal 3, logs.size - assert_equal "Redirected to http://foo.bar/ with status 302", logs[0] + assert_equal "Redirected to http://foo.bar/", logs[0] end def test_send_data |