comfy / active_link_to

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

Active link to matching label name. #54

Closed pdx91 closed 7 years ago

pdx91 commented 7 years ago

Is there any way I or potential solution if I want the regex to match the label name instead of the original url?

Thanks

GBH commented 7 years ago

You probably need to so something like this:

- is_active = label == "Some Label"
= active_link_to label, '/some-path', active: is_active
pdx91 commented 7 years ago

Thank you sir!