Skip to content

Loading…

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

Merged
merged 1 commit into from

4 participants

@rafmagana

No description provided.

@jeremy
Ruby on Rails member

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

@dmathieu

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

@rafmagana

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
@josevalim
Ruby on Rails member

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

@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
View
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(ActionDispatch::ExceptionWrapper.new({}, payload[:exception]).status_code)
+ status = ActionDispatch::ExceptionWrapper.new({}, payload[:exception]).status_code
end
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.