I know how to create a new generator in Rails. However, I simply want to tweak the views a bit. Is there an easy way to do this? I guess I could go into the directory in my operating system where Rails resides and modify those files (I assume that's easy). But then those changes will apply to every Rails project, not just the one I care about at the moment. And it'll get wiped away when I update Rails (frequently).
Using Rails 3.2.13, but happy to upgrade to 4.0 beta if that helps.
You can find the answer in this RailsCast, note particularly the section on "Customizing Templates". You create the files in your Rails root lib/
directory, so it won't apply to every app, just your current one, and it will be independent of Rails versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With