title: How can I access the name of the partial from within the layout in Rails
body: <p>I have a simple partial/layout situation where the layout is as follows;</p>
  
  <pre><code>&lt;div class="widget"&gt;
    &lt;%= yield %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and then within my view I am rendering a partial as;</p>
  
  <pre><code>&lt;%= render :partial =&gt; "my_partial", :layout =&gt; "my_layout" %&gt;
  </code></pre>
  
  <p>From within the layout, I want to be able to add the name of the partial (preferably without passing local variables) such that I can customize the widget using CSS.</p>
  
  <p>Ideally, it would be something like this (from within the layout)</p>
  
  <pre><code>&lt;div class="widget &lt;%= partial.name %&gt;"&gt;
  </code></pre>
  
  <p>Is there anyway to access the name of the partial that is being rendered from within the layout?</p>
  
  <p>Thanks.</p>