Skip to content

Commit

Permalink
#503 Use module_parent_name for rails 6 upwards
Browse files Browse the repository at this point in the history
  • Loading branch information
quorak committed Jan 20, 2021
1 parent c054107 commit fcbb970
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/exception_notifier/modules/formatter.rb
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 fcbb970

Please sign in to comment.