zachinglis / crummy

Tasty breadcrumbs! Crummy is a simple and tasty way to add breadcrumbs to your Rails applications.
http://zachinglis.com
MIT License
358 stars 82 forks source link

Last breadcrumb set as not linked #39

Closed adam-pl closed 11 years ago

adam-pl commented 11 years ago

Added "can_link" param to verify if current breadcrumb must be linked (see methods: crumb_to_html, crumb_to_html_list).

I've done it because in my web project last breadcrumb is connected with visited page. In this case breadcrumb should not be linked.

Well, it's not perfect solution. I would like to have method that checks this condition automatically with using "current_page?" helper method.

It's hard to do now because context is required. For details how to do that see "breadcrumbs_on_rails" gem.

Thank you.

andrew commented 11 years ago

This looks good although needs a couple changes:

If you can do those two bits we can merge it in and release a new version, thanks!

adam-pl commented 11 years ago

Done

andrew commented 11 years ago

Awesome, great work, thanks!

adam-pl commented 11 years ago

What about adding info about new param :last_crumb_linked ? Who can do that?

andrew commented 11 years ago

I'll add that to the readme now.

adam-pl commented 11 years ago

Ok, thank you :-)

andrew commented 11 years ago

I've pushed a new release with this in: https://rubygems.org/gems/crummy/versions/1.7.1

Thanks again!

adam-pl commented 11 years ago

Great :-)

I've checked the readme. I think you could also add line :last_crumb_linked in the Possible parameters for configuration are: section.