jejacks0n / navigasmic

Navigasmic: Semantic navigation for Rails using simple view level or configuration definitions.
322 stars 29 forks source link

highlights_on: false doesn't work #19

Closed fantgeass closed 11 years ago

fantgeass commented 11 years ago

I set "highlights_on: false" to the item, but LI-tag still have class 'active' when I'm on that page.

jejacks0n commented 11 years ago

Does it work with nil?, or an empty array?

fantgeass commented 11 years ago

nope

gucki commented 11 years ago

I think the problem is that you always add the link to the list: https://github.com/jejacks0n/navigasmic/blob/f62ae1717db0b837c7bf3edfb3292ab408ce85a6/lib/navigasmic/core/item.rb#L52

I'd prefer to only add the link as a default, so when no :highlights_on argument is given. This is in incompatible change, but imo the only way to make :hightlights_on => false - and other cases where you don't want the item be highlighted when visiting the link it points to - work. What do you think?

jejacks0n commented 11 years ago

Looks like this is fixed.. please report your findings.