Rails Edge: application template

(05.12.2008)

I’d like to notice that finally a really nice feature will be introduced in version 2.3 of Rails: the application template.</p>

Basically it’ll be possible to have a pre-confugired Rails applications (in fact, some of them were built during last months, eg: baseapp) with, for example, some installed gems/plugins, resources already present, and so on.

The most interesting thing is that the application template can be expressed through an URI, so everyone can easily publish and share its own templates.

Example (from Patrik Naik blog):

rails blog -m ~/template.rb  
# or
rails blog -m http://gist.github.com/31208.txt

# template file can be something like that
run "rm public/index.html"
generate(:scaffold, "person name:string")
route "map.root :controller =&gt; 'people'"
rake("db:migrate")

git :init
git :add =&gt; "."
git :commit =&gt; "-a -m 'Initial commit'"


Comments

(Comments)
blog comments powered by Disqus