Skip to content


remove duplicate usage of Rack::Utils.status_code in LogSubscriber#process_action #6253

merged 1 commit into from

4 participants


No description provided.

Ruby on Rails member

This is odd -- any idea why it was wrapped?


This happened here.
@josevalim, do you remember if this repetition of status_code was intentional ?


I don't know why, I realized it was duplicated, I asked @josevalim the reason behind it, he said it shouldn't be like that, so I sent the pull request. I looked for other cases like that but it was the only one.

@josevalim josevalim merged commit 9b1eb4f into rails:master
Ruby on Rails member

I think it was an accident that happened with the refactoring. Thanks @rafmagana !


Thank you, @josevalim!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 10, 2012
  1. @rafmagana
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/log_subscriber.rb
2 actionpack/lib/action_controller/log_subscriber.rb
@@ -20,7 +20,7 @@ def process_action(event)
status = payload[:status]
if status.nil? && payload[:exception].present?
- status = Rack::Utils.status_code({}, payload[:exception]).status_code)
+ status ={}, payload[:exception]).status_code
message = "Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in %.0fms" % event.duration
message << " (#{additions.join(" | ")})" unless additions.blank?
Something went wrong with that request. Please try again.