title: Rails, Passing a variable from the controller to the App Layout
body: <p>I have the following:</p>
  
  <p><strong>In my controller:</strong></p>
  
  <pre><code>  def gettingstarted
      @title = "Getting Started"
          respond_to do |format|
        format.html { render :layout =&gt; true, :showLeftNav =&gt; false }
      end
    end
  </code></pre>
  
  <p>In my default application layout file <strong>Layouts/application.html.erb</strong>: </p>
  
  <pre><code>&lt;% showLeftNav = true if local_assigns[:showLeftNav].nil? %&gt;
  &lt;body style="&lt;% if showLeftNav == false %&gt;background:none !important;&lt;% end %&gt;"&gt;
  </code></pre>
  
  <p>Am I passing showLeftNav incorrectly from the controller to the layout?</p>