Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing template to "rails new"

When calling "rails new" it is obviously possible to pass some kind of template or setup script via the "-m" command line parameter. I found this via https://github.com/fortuity/rails3-mongoid-devise/wiki/Tutorial-(Walkthrough). And https://github.com/fortuity/rails3-application-templates/blob/master/rails3-mongoid-devise-template.rb looks like DSL for manipulating Rails applications. That looks quite cool, but I was not able to find more information about it. Could somebody point me to the related documentation?

like image 943
Achim Avatar asked Feb 20 '11 15:02

Achim


1 Answers

Here is some information you may find useful:

  • Rails templates (a high-level overview)
  • Templates in Rails 3 (lists some of the commands and links to documentation)
  • RDoc for Thor::Actions
  • Source for Rails specific actions

I also found this guide in the Rails source code which isn't linked to from the main Guides page, but may have some useful information for you.

You may also be interested in the source for the default app template methods, which is used when you use rails new with no -m option, or this application template I started on a while back that explores some different options.

like image 147
Michelle Tilley Avatar answered Oct 14 '22 16:10

Michelle Tilley