Method: ActiveSupport::ErrorReporter#set_context
- Defined in:
- lib/active_support/error_reporter.rb
#set_context ⇒ Object
Update the execution context that is accessible to error subscribers. Any context passed to #handle, #record, or #report will be merged with the context set here.
Rails.error.set_context(section: "checkout", user_id: @user.id)
202 203 204 |
# File 'lib/active_support/error_reporter.rb', line 202 def set_context(...) ActiveSupport::ExecutionContext.set(...) end |