-
Notifications
You must be signed in to change notification settings - Fork 187
Overriding scaffold erb templates #164
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
Comments
You can configure which files are watched in tailwind.config.js. |
Please, can you double-check your answer? It sounds to me like it has nothing to do with the issue. We are trying to override the erb templates generated by
Also, I have tried this path:
Both are not working. Thanks @dhh |
Ah I read it as a watching question. This gem is already overriding the scaffold templates, so that's probably why. Would be happy to look at a PR if you find a way to make this compatible with overwritten templates. |
This source_root line here is overriding the default behaviour
If I comment that out then I can pick up from Maybe an if / else clause that looks to see if the app has defined custom templates then use those, if not then use the ones in tailwindcss Unfortunately I don't see how where the custom template path is defined in the regular generator. |
@craic Not sure if this could be merged into the gem, but overriding the class method I added this file
|
Current behavior: Custom templates are ignored by the tailwindcss-rails generator Expected behavior: View templates under "#{RAILS_ROOT}/lib/templates/erb/scaffold" should be prioritized by the generator. rails#164
Current behavior: Custom templates are ignored by the tailwindcss-rails generator Expected behavior: View templates under "#{RAILS_ROOT}/lib/templates/erb/scaffold" should be prioritized by the generator. rails#164
Rails 7.0.2.3 ruby 3.0.0p0 ubuntu
I want to modify the erb templates used in scaffolding but the tailwindcss template engine doesn't pick up custom templates from lib/templates/erb/scaffold
Does it use a different location ? I don't see an option in 'rails g scaffold --help' where I can specify that explicitly
Thanks !
The text was updated successfully, but these errors were encountered: