title: rails css class="current"
body: <p>I am trying to add a <code>class="current"</code> to the current page in the navigation 
  to the first <code>&lt;li&gt;</code>. So the html should look like 
  <code>&lt;li id="nav-home" class="current"&gt;</code> but only to the current page.</p>
  
  <pre><code>&lt;% subjects.each do |subject| %&gt;
    &lt;li id="nav-&lt;%= subject.name %&gt;" &gt;
      &lt;a &lt;%= link_to(subject.name, :action =&gt; 'show') %&gt;&lt;/a&gt;
      &lt;ul&gt;
      &lt;% subject.pages.visible.sorted.each do |page| %&gt;
        &lt;li &gt;&lt;%= link_to(page.name, :action =&gt; 'show', :id =&gt; page.permalink) %&gt;&lt;/li&gt;
      &lt;/ul&gt;   
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>