Skip to content

Commit

Permalink
Merge pull request #504 from quorak/quorak-patch-module_parent_name
Browse files Browse the repository at this point in the history
#503 Use module_parent_name for rails 6 upwards
  • Loading branch information
smartinez87 authored Jan 20, 2021
2 parents 28b2f33 + fcbb970 commit e9f09b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/exception_notifier/modules/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def controller_and_action
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
Expand Down

0 comments on commit e9f09b8

Please sign in to comment.