I have a link to the users profile in my meta navigation and I am
looking for an easy, automatic way to tell the user, that the is
currently on the page that the link describes.
This is good but not good enough, since I cannot assign an "active"
class in case the page is the current page.
= link_to_unless_current "your profile", user_url(current_user)
According to the documentation (http://github.com/rails/rails/blob/
helpers/url_helper.rb#L354) there is a solution for that:
= link_to_unless_current "Dein Profil", user_url(current_user) do |
This works fine with one problem: It generates an unwanted "0" after
Output if url is current:
<strong class="current"> Dein Profil </strong>
Where does this "0" come from and how do I get rid of it?
Thanks a lot!