![]() |
1
1
|
![]() |
2
-1
你可以这样做 def page_header(title, &block) concat( render :partial=>"shared/page_header",:locals=>{:title=>title,:body=> capture(&block)}) end
<div class='page-header'> <h2> <%= title %> </h2> <%= body %> </div> |
![]() |
Stilian · 存储库设置中没有Github页面部分 2 年前 |
![]() |
Kellen · 查看$卷展栏功能列表 2 年前 |
![]() |
Akshit Thakur Ak · 我怎样才能把铁轨停下来? 2 年前 |
![]() |
johncssjs · 将数组转换为每个元素的嵌套哈希 2 年前 |
![]() |
solidsnake99 · Rails db:如何绕过验证 2 年前 |