module Notificate::Rails::Controller

Public Class Methods

included(klass) click to toggle source
# File lib/notificate-rails/controller.rb, line 2
def self.included(klass)
  klass.extend ControllerMethods
end

Public Instance Methods

_notificate_around_filter() { || ... } click to toggle source
# File lib/notificate-rails/controller.rb, line 17
def _notificate_around_filter
  begin
    yield
  rescue Object => error
    handler = error.respond_to?(:original_exception) ? error.original_exception : error

    notify_notificate(error) unless handler_for_rescue(handler)

    raise
  end
end
notify_notificate(exception) click to toggle source
# File lib/notificate-rails/controller.rb, line 13
def notify_notificate(exception)
  ::Notificate::ExceptionCatcher.notify(exception, rails_data)
end
rails_data() click to toggle source
# File lib/notificate-rails/controller.rb, line 6
def rails_data
  {
    environment: ::Notificate::Rails.options.environment,
    root:        ::Notificate::Rails.options.project_root
  }
end