def extract_and_merge_controller_data(data)
      if @controller
        data[:request] = {
          params:      @controller.request.parameters.to_hash,
          rails_root:  defined?(Rails) && defined?(Rails.root) ? Rails.root : "Rails.root not defined. Is this a test environment?",
          url:         @controller.complete_request_uri
        }
        data[:environment].merge!(@controller.request.env.to_hash)

        @controller.session[:fault_in_session]
        data[:session] = {
          key:         @controller.request.session_options[:id],
          data:        @controller.session.to_hash
        }
      end
    end
def extract_and_merge_controller_data(data)
      if @controller
        data[:request] = {
          params:      @controller.request.parameters.to_hash,
          rails_root:  defined?(Rails) && defined?(Rails.root) ? Rails.root : "Rails.root not defined. Is this a test environment?",
          url:         @controller.complete_request_uri
        }
        data[:environment].merge!(@controller.request.env.to_hash)

        @controller.session[:fault_in_session]
        data[:session] = {
          key:         @controller.request.session_options[:id],
          data:        @controller.session.to_hash
        }
      end
    end
Pull certain fields out of the controller and add to the data hash.