Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Navbar#11

Open
jengeb wants to merge 8 commits intomasterfrom
navbar
Open

Navbar#11
jengeb wants to merge 8 commits intomasterfrom
navbar

Conversation

@jengeb
Copy link
Contributor

@jengeb jengeb commented Aug 27, 2015

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can refactor this to use the current_page? helper
http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-current_page-3F

Even better would be to create nav_bar helper that take's the link path and name and works out the class internally see for a nice example: http://solvedstack.com/questions/best-way-to-add-current-class-to-nav-in-rails-3

Let me know if you need any help

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I will improve the code having regard to this feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants