提交 b5c6f33f 编写于 作者: G George Claghorn

Provide the whole response

上级 997770f5
* `process_action.action_controller` notifications now include the following in their payloads:
* `:request` - the `ActionDispatch::Request`
* `:location` - the `Location` response header
* `:response` - the `ActionDispatch::Response`
*George Claghorn*
......
......@@ -20,20 +20,20 @@ def process_action(*)
raw_payload = {
controller: self.class.name,
action: action_name,
request: request,
params: request.filtered_parameters,
headers: request.headers,
format: request.format.ref,
method: request.request_method,
path: request.fullpath,
request: request
path: request.fullpath
}
ActiveSupport::Notifications.instrument("start_processing.action_controller", raw_payload)
ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|
result = super
payload[:response] = response
payload[:status] = response.status
payload[:location] = response.filtered_location
result
ensure
append_info_to_payload(payload)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册