AnA*_*ice 3 ruby-on-rails ruby-on-rails-3
我有以下内容:
在我的控制器中:
def gettingstarted
@title = "Getting Started"
respond_to do |format|
format.html { render :layout => true, :showLeftNav => false }
end
end
Run Code Online (Sandbox Code Playgroud)
在我的默认应用程序布局文件Layouts/application.html.erb中:
<% showLeftNav = true if local_assigns[:showLeftNav].nil? %>
<body style="<% if showLeftNav == false %>background:none !important;<% end %>">
Run Code Online (Sandbox Code Playgroud)
我是否将showLeftNav从控制器错误传递给布局?
| 归档时间: |
|
| 查看次数: |
3338 次 |
| 最近记录: |