Class: Airbrake::Rack::HttpParamsFilter
- Inherits:
-
Object
- Object
- Airbrake::Rack::HttpParamsFilter
- Defined in:
- lib/airbrake/rack/http_params_filter.rb
Overview
Adds HTTP request parameters.
Instance Attribute Summary collapse
- #weight ⇒ Integer readonly
Instance Method Summary collapse
- #call(notice) ⇒ Object
-
#initialize ⇒ HttpParamsFilter
constructor
A new instance of HttpParamsFilter.
Constructor Details
#initialize ⇒ HttpParamsFilter
Returns a new instance of HttpParamsFilter.
12 13 14 |
# File 'lib/airbrake/rack/http_params_filter.rb', line 12 def initialize @weight = 97 end |
Instance Attribute Details
#weight ⇒ Integer (readonly)
10 11 12 |
# File 'lib/airbrake/rack/http_params_filter.rb', line 10 def weight @weight end |
Instance Method Details
#call(notice) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/airbrake/rack/http_params_filter.rb', line 17 def call(notice) return unless (request = notice.stash[:rack_request]) notice[:params].merge!(request.params) rails_params = request.env['action_dispatch.request.parameters'] notice[:params].merge!(rails_params) if rails_params end |