Hi,
I'm trying to build a method in order to add a specific css class to my nav menu on current pages.
Here is my start: (in application_helper)
def menu_links(param)
if request.fullpath == "#{param}_path"
return "#{param}_path"
end
end
in my app view:
<%= menu_links("help") %>
However, if I change request.fullpath == "#{param}_path" by request.fullpath == help_path, it works. don't know why.
Thanks for any help!