Created
February 27, 2017 11:02
-
-
Save leylaKapi/56d67c3975efceadbdb16f9ad8d7f5bb to your computer and use it in GitHub Desktop.
Navbar active class in rails
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 set_active_class value | |
if params[:controller] == value | |
'active' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment