diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7780e22..f2d7fad 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -6,4 +6,8 @@ def collapse_search_form "" end end + + def active_nav_link(path) + request.path.split("/").second == path[1..-1] ? "active" : "" + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ed5967e..6e3dab9 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -41,11 +41,16 @@