Skip to content

Instantly share code, notes, and snippets.

@srpouyet
Last active December 15, 2015 14:39
Show Gist options
  • Save srpouyet/5276314 to your computer and use it in GitHub Desktop.
Save srpouyet/5276314 to your computer and use it in GitHub Desktop.
Rails 3 active class navigation helper which by default takes query params into account.
%ul.nav.nav-pills
- active_li_link_to "Suppliers", companies_path(type: 'supplier')
- active_li_link_to "Customers", companies_path(status: 'customer')
- active_li_link_to "All Companies", Companies_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment