-
-
Save iwasrobbed/853223 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def link_to_with_highlight(name, options = {}, html_options = {}) # same sig as #link_to | |
html_options.merge!({ :class => 'active' }) if current_page?(options) | |
link_to(name, options, html_options) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment