Sha256: e954a5e67775988c52a0ea1608ba950433dd9f8646847bde7f8b10f1b9279ec3
Contents?: true
Size: 1017 Bytes
Versions: 69
Compression:
Stored size: 1017 Bytes
Contents
module Rollbar module Rails module ControllerMethods include RequestDataExtractor def rollbar_person_data user = send(Rollbar.configuration.person_method) # include id, username, email if non-empty if user { :id => (user.send(Rollbar.configuration.person_id_method) rescue nil), :username => (user.send(Rollbar.configuration.person_username_method) rescue nil), :email => (user.send(Rollbar.configuration.person_email_method) rescue nil) } else {} end rescue NoMethodError, NameError {} end def rollbar_request_data extract_request_data_from_rack(request.env) end # for backwards compatabilty with the old ratchetio-gem def ratchetio_person_data rollbar_person_data end # for backwards compatabilty with the old ratchetio-gem def ratchetio_request_data rollbar_request_data end end end end
Version data entries
69 entries across 69 versions & 1 rubygems