comfy / active_link_to

Rails view helper to manage "active" state of a link
MIT License
844 stars 84 forks source link

Using with html_options param seems to break :active => :exclusive #41

Closed matthisamoto closed 8 years ago

matthisamoto commented 8 years ago

When trying to add to class string using html_options param from link_to, adding :active => :exclusive doesn't seem to be working: my root link is always active, but only when including this classing object.

<%= active_link_to "Home", root_path, { :class => 'nav-link' }, :active => :exclusive %>
matthisamoto commented 8 years ago

Realizing if I don't use an object it seems to work fine.

matthisamoto commented 8 years ago

Doing something like this seems to work fine, as opposed to using an object, I'm going to close.

<%= active_link_to "Home", root_path, class: 'nav-link', data: { :test => 'true' }, :active => :exclusive %>