module Rollbar::Rails::ControllerMethods

Public Instance Methods

ratchetio_person_data() click to toggle source

for backwards compatabilty with the old ratchetio-gem

# File lib/rollbar/plugins/rails/controller_methods.rb, line 46
def ratchetio_person_data
  rollbar_person_data
end
ratchetio_request_data() click to toggle source

for backwards compatabilty with the old ratchetio-gem

# File lib/rollbar/plugins/rails/controller_methods.rb, line 51
def ratchetio_request_data
  rollbar_request_data
end
rollbar_person_data() click to toggle source
# File lib/rollbar/plugins/rails/controller_methods.rb, line 9
def rollbar_person_data
  user = nil
  unless Rollbar::Util.method_in_stack_twice(:rollbar_person_data, __FILE__)
    user = send(Rollbar.configuration.person_method)
  end

  # include id, username, email if non-empty
  if user
    {
      :id => (begin
        user.send(Rollbar.configuration.person_id_method)
      rescue StandardError
        nil
      end),
      :username => (begin
        user.send(Rollbar.configuration.person_username_method)
      rescue StandardError
        nil
      end),
      :email => (begin
        user.send(Rollbar.configuration.person_email_method)
      rescue StandardError
        nil
      end)
    }
  else
    {}
  end
rescue NameError
  {}
end
rollbar_request_data() click to toggle source
# File lib/rollbar/plugins/rails/controller_methods.rb, line 41
def rollbar_request_data
  extract_request_data_from_rack(request.env)
end