2010-02-15 14 views

Respuesta

0

si se descarga nifty_generators de ryanb y mirar el código fuente, se puede ver que tiene lo siguiente en uno de sus archivos

if options[:haml] 
    m.directory 'public/stylesheets/sass' 
    m.template "layout.html.haml", "app/views/layouts/#{file_name}.html.haml" 
    m.file  "stylesheet.sass", "public/stylesheets/sass/#{file_name}.sass" 
    else 
    m.template "layout.html.erb", "app/views/layouts/#{file_name}.html.erb" 
    m.file  "stylesheet.css", "public/stylesheets/#{file_name}.css" 
    end 

Esto permite al usuario hacer script/generar nifty_layout --haml

sustancia viscosa suerte