In my view, I have:
<li class="<%= 'active' if current_page?(:controller => 'posts') %>"><a href="/posts">Posts</a></li>
The problem is, when I move away from /posts/ path, the class is turned off again. For example, when I go to /posts/1, the link class is not active anymore. I thought it would still be active because the controller stays the same. How should I fix the problem?