Friday, November 26, 2010

How to Apply App Templates to Existing Rails Applications

If you haven't yet discovered the power of rails app templates, then chances are you're wasting valuable time setting up applications in the same way over and over again. I encourage you check out Ryan Bates' railscast on them.

This post, however, is not about application templates (you can find plenty of info online already), but about how to apply them to existing templates.

In my Rails app, I created a file called automate.rb. To apply it to my app, I enter the following nifty rake command into the command console:



This runs the contents of automate.rb on the existing rails application. Perfect.