From ade3d8c2d638c99e55196d28033c9e977a7bf0d3 Mon Sep 17 00:00:00 2001 From: Panos Dalitsouris Date: Tue, 5 Jan 2021 20:16:44 +0200 Subject: [PATCH] Replace parent with module_parent_name Since Rails 6.0 the parent method is replaced with module_parent https://github.com/rails/rails/pull/34051 --- lib/rails/generators/mongoid/config/config_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rails/generators/mongoid/config/config_generator.rb b/lib/rails/generators/mongoid/config/config_generator.rb index 376a73c6e0..6274e06c25 100644 --- a/lib/rails/generators/mongoid/config/config_generator.rb +++ b/lib/rails/generators/mongoid/config/config_generator.rb @@ -15,7 +15,7 @@ def self.source_root end def app_name - Rails::Application.subclasses.first.parent.to_s.underscore + Rails::Application.subclasses.first.module_parent.to_s.underscore end def create_config_file