2010-02-12 50 views
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 
+0

此链接有助于:http://m.onkey.org/2008/12/4/rails-templates – nanda 2010-02-12 18:29:01

回答

1

我使用authlogic和declarative_authorization在我的Rails应用,所以我认为我可以满足应用程序模板中使用的基本设置,和/或在某处搜索此类模板。

我没有找到模板存储库,只发现了一个自动模板生成器。所以我根据自己的需要创建了一个模板,并发布在http://gist.github.com/b66c262ee2e8b27d416f