0
是否有任何站点或存储库可以为Rails应用程序下载和/或共享模板?适用于应用程序的Ruby on Rails模板(rails 2.3版本)
例子:
# template.rb
run "rm public/index.html"
generate(:scaffold, "person name:string")
route "map.root :controller => 'people'"
rake("db:migrate")
git :init
git :add => "."
git :commit => "-a -m 'Initial commit'"
而做到这一点:
rails myapp -m ~/template.rb
...或者说:
rails myapp
cd myapp
rake rails:template LOCATION=~/template.rb
此链接有助于:http://m.onkey.org/2008/12/4/rails-templates – nanda 2010-02-12 18:29:01