Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Module#module_parent_name instead of Module#parent_name #2713

Merged
merged 1 commit into from Feb 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/generators/graphql/core.rb
Expand Up @@ -48,11 +48,19 @@ def schema_name
if options[:schema]
options[:schema]
else
require File.expand_path("config/application", destination_root)
"#{Rails.application.class.parent_name}Schema"
"#{parent_name}Schema"
end
end
end

def parent_name
require File.expand_path("config/application", destination_root)
if Rails.application.class.respond_to?(:module_parent_name)
Rails.application.class.module_parent_name
else
Rails.application.class.parent_name
end
end
end
end
end