lib/exception_notifier/modules/formatter.rb in exception_notification-4.4.3 vs lib/exception_notifier/modules/formatter.rb in exception_notification-4.5.0
- old
+ new
@@ -109,10 +109,14 @@
attr_reader :exception, :env, :errors_count
def rails_app_name
return unless defined?(::Rails) && ::Rails.respond_to?(:application)
- Rails.application.class.parent_name.underscore
+ if Rails::VERSION::MAJOR >= 6
+ Rails.application.class.module_parent_name.underscore
+ else
+ Rails.application.class.parent_name.underscore
+ end
end
def controller
env['action_controller.instance'] if env
end