Closed flavorjones closed 8 months ago
Works great with scaffolds.
However, it doesn't work with controllers(bin/rails g controller Home index
) or mailers(bin/rails g mailer User notify
). I'm not certain how frequently people would need to override those, but in those cases, it is not working.
@dixpac Yeah, I was hoping nobody would care about overriding those. :laughing: :sob:
You're right, while I'm here I might as well add mailer and controller. Thanks for the review!
Originally reported at #164
I think this PR is preferable to #247 because it has tests and is a simpler fix.
Note that in order to test this, the test suite now uses the same temporary directory for all tests, so we are then able to set
Rails::Generators.templates_path
before the generator classes are instantiated.cc @dixpac