diff options
| author | mo khan <mo@mokhan.ca> | 2013-05-04 23:57:27 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-05-04 23:57:27 -0600 |
| commit | 46c4ca183eb86997cfe24a6eadf925f3b5636141 (patch) | |
| tree | 3724eff70baf94da7cf28c0b86088c378da583cb /app/controllers/application_controller.rb | |
| parent | 11e4a5ae103333804d1aef0aefba7caf35c94074 (diff) | |
add mixpanel infrastructure
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 27f1ad77..413a7712 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,16 @@ class ApplicationController < ActionController::Base protect_from_forgery + before_filter :initialize_env + + private + def initialize_env + @request_env = { + 'REMOTE_ADDR' => request.env['REMOTE_ADDR'], + 'HTTP_X_FORWARDED_FOR' => request.env['HTTP_X_FORWARDED_FOR'], + 'rack.session' => request.env['rack.session'].to_hash, + 'mixpanel_events' => request.env['mixpanel_events'] + } + end def resolve(target) target.new(current_user) |
