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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.