Module: Errplane::Rails::AirTrafficController

Defined in:
lib/errplane/rails/air_traffic_controller.rb

Instance Method Summary collapse

Instance Method Details

#errplane_request_dataObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/errplane/rails/air_traffic_controller.rb', line 4

def errplane_request_data
  unfiltered_params = params.to_hash
  if respond_to?(:filter_parameters)
    filtered_params = filter_parameters(unfiltered_params)
  elsif defined? request.filtered_parameters
    filtered_params = request.filtered_parameters
  else
    filtered_params = unfiltered_params.except(:password, :password_confirmation)
  end

  {
    :params => filtered_params,
    :session_data => errplane_session_data,
    :controller => params[:controller],
    :action => params[:action],
    :request_url => errplane_request_url,
    :user_agent => request.env["HTTP_USER_AGENT"],
    :remote_ip => request.remote_ip,
    :referer => request.referer,
    :current_user => (current_user rescue nil)
  }
end