Permalink
Browse files

Use .ref instead of .to_sym.

  • Loading branch information...
1 parent fa8623b commit c515f64f72d070b9481ab8b62c98aaae45b96323 @josevalim josevalim committed May 7, 2011
@@ -7,8 +7,10 @@ class LogSubscriber < ActiveSupport::LogSubscriber
def start_processing(event)
payload = event.payload
params = payload[:params].except(*INTERNAL_PARAMS)
+ format = payload[:format]
+ format = format.to_s.upcase if format.is_a?(Symbol)
- info " Processing by #{payload[:controller]}##{payload[:action]} as #{payload[:formats].first.to_s.upcase}"
+ info " Processing by #{payload[:controller]}##{payload[:action]} as #{format}"
info " Parameters: #{params.inspect}" unless params.empty?
end
@@ -19,7 +19,7 @@ def process_action(*args)
:controller => self.class.name,
:action => self.action_name,
:params => request.filtered_parameters,
- :formats => request.formats.map(&:to_sym),
+ :format => request.format.ref,
:method => request.method,
:path => (request.fullpath rescue "unknown")
}

0 comments on commit c515f64

Please sign in to comment.