Module: Rollbar::Rails::ControllerMethods
- Includes:
- Rollbar::RequestDataExtractor
- Defined in:
- lib/rollbar/plugins/rails/controller_methods.rb
Constant Summary
Constants included from Rollbar::RequestDataExtractor
Rollbar::RequestDataExtractor::ALLOWED_BODY_PARSEABLE_METHODS, Rollbar::RequestDataExtractor::ALLOWED_HEADERS_REGEX
Instance Method Summary collapse
-
#ratchetio_person_data ⇒ Object
for backwards compatabilty with the old ratchetio-gem.
-
#ratchetio_request_data ⇒ Object
for backwards compatabilty with the old ratchetio-gem.
- #rollbar_person_data ⇒ Object
- #rollbar_request_data ⇒ Object
Methods included from Rollbar::RequestDataExtractor
#extract_person_data_from_controller, #extract_request_data_from_rack, #scrub_params, #scrub_url
Instance Method Details
#ratchetio_person_data ⇒ Object
for backwards compatabilty with the old ratchetio-gem
43 44 45 |
# File 'lib/rollbar/plugins/rails/controller_methods.rb', line 43 def ratchetio_person_data end |
#ratchetio_request_data ⇒ Object
for backwards compatabilty with the old ratchetio-gem
48 49 50 |
# File 'lib/rollbar/plugins/rails/controller_methods.rb', line 48 def ratchetio_request_data end |
#rollbar_person_data ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/rollbar/plugins/rails/controller_methods.rb', line 9 def return {} if ::Util.method_in_stack_twice(:rollbar_person_data, __FILE__) config = .configuration user = send(config.person_method) return {} unless user # include id, username, email if non-empty { :id => (begin user.send(config.person_id_method) if config.person_id_method rescue StandardError nil end), :username => (begin user.send(config.person_username_method) if config.person_username_method rescue StandardError nil end), :email => (begin user.send(config.person_email_method) if config.person_email_method rescue StandardError nil end) } rescue NameError {} end |
#rollbar_request_data ⇒ Object
38 39 40 |
# File 'lib/rollbar/plugins/rails/controller_methods.rb', line 38 def extract_request_data_from_rack(request.env) end |