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

Unable to override resource or controller templates #84

Open
jasonkarns opened this issue Apr 23, 2022 · 0 comments
Open

Unable to override resource or controller templates #84

jasonkarns opened this issue Apr 23, 2022 · 0 comments

Comments

@jasonkarns
Copy link

I'm on Rails 7 with latest Graphiti-rails 0.4.0

I can successfully override the api_test templates by placing them in:

lib/templates/graphiti/api_test/{create|show|...}_request_spec.rb.erb

However, dropping in resource.rb.erb or controller.rb.erb in:

lib/templates/graphiti/resource is not picked up. I've also tried placing them in a templates/ subdir of the above.

I also tried lib/templates/graphiti/controller for some reason. (I didn't expect that to work since the generator that uses these templates is graphiti:resource which maps to ResourceGenerator. But I tried it anyway.)

Am I doing something wrong? Has anyone else successfully used custom resource/controller templates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant