Sha256: 3fad2ad1e28449f5695aa3bdbd956f18ffd16d69983b1370fc2649ea3f280d63
Contents?: true
Size: 834 Bytes
Versions: 51
Compression:
Stored size: 834 Bytes
Contents
module Bugsnag::Middleware class Rails3Request def initialize(bugsnag) @bugsnag = bugsnag end def call(notification) if notification.request_data[:rack_env] env = notification.request_data[:rack_env] params = env["action_dispatch.request.parameters"] if params # Set the context notification.context = "#{params[:controller]}##{params[:action]}" # Augment the request tab notification.add_tab(:request, { :railsAction => "#{params[:controller]}##{params[:action]}", :params => params }) end # Add the rails version notification.add_tab(:environment, { :railsVersion => Rails::VERSION::STRING }) end @bugsnag.call(notification) end end end
Version data entries
51 entries across 51 versions & 1 rubygems