Permalink
Browse files

improved readability

  • Loading branch information...
1 parent 0437a10 commit dcb86b6bbcbfd37809c6ce7ad635258d729c0c8c @shime shime committed Mar 2, 2012
Showing with 6 additions and 8 deletions.
  1. +6 −8 lib/airbrake/rails/controller_methods.rb
@@ -37,17 +37,15 @@ def airbrake_request_data
def airbrake_filter_if_filtering(hash)
return hash if ! hash.is_a?(Hash)
- # Rails 2
- if respond_to?(:filter_parameters)
- filter_parameters(hash)
- # Rails 3
- elsif defined?(ActionDispatch::Http::ParameterFilter)
+
+ if respond_to?(:filter_parameters) # Rails 2
+ filter_parameters(hash)
+ elsif defined?(ActionDispatch::Http::ParameterFilter) # Rails 3
ActionDispatch::Http::ParameterFilter.new(::Rails.application.config.filter_parameters).filter(hash)
else
hash
- end
- rescue
- hash
+ end rescue hash
+
end
def airbrake_session_data

0 comments on commit dcb86b6

Please sign in to comment.