2008年5月6日 星期二

layout

the layout for all website:
method 1:
use application.html.erb, it is the layout for all website
method 2:
ex:
define the layout test.html.erb
add following line to app/controllers/application.rb
layout "test"

yield:
render the template.  The template is rendered at this location within layout

layout can access variable defined in the template 


沒有留言: