I'm new to Rails, so forgive me if this is something simple, but it seems that what I wrote is correct. I use the ternary operator, in my opinion, to decide whether to add an active class or not:
<li class="<% is_current_page('') ? 'active' : '' %>">
And I debugged and know what is_current_page('')returns true.
source
share