-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
No easy way to override the scaffold controller spec generator #765
Comments
I don't really know how to make this work. It seems like work on Rails' generator mechanism would be required. If you have any more information about this, or want to implement it, I'd be happy to look at some code :) But given this, I'm going to close as not an issue. |
In the rails generator documentation, it says you can override the templates by putting a file with the same name in your app with the same relative path of the original generator: |
@oveddan did you resolve this issue? |
Not yet - I think it has do something with the way rails selects its generator template for scaffolds. Need to look into this more. |
Looks like it actually does work, I just had the path to put the overriding template file wrong. The correct path is: When putting a file in that correct path, the template gets overriden by that file. |
I want to change the way the scaffold controller spec gets generated.
When creating a new generator in my rails app at:
lib/generators/rspec/scaffold/templates/controller_spec.rb
This never gets invoked, only the out of the box rspec-rails scaffold controller generator gets invoked.
It would be great if we could easily just change the way the specs for scaffold controllers are generated.
The text was updated successfully, but these errors were encountered: