Carlo Pecchia

BlogAbout me

email RSS twitter LinkedIn

© 2015. All rights reserved. - terms of use

Rails Edge: application template


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

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

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


blog comments powered by Disqus