weppos / breadcrumbs_on_rails

A simple Ruby on Rails plugin for creating and managing a breadcrumb navigation.
https://simonecarletti.com/code/breadcrumbs-on-rails
MIT License
944 stars 188 forks source link

Handle breadcrumbs on POST and PUT requests #9

Closed visoft closed 12 years ago

visoft commented 13 years ago

Modified the simple builder to set the last item to "active" on an HTTP POST request

See https://github.com/weppos/breadcrumbs_on_rails/issues/4 for more details

weppos commented 13 years ago

I'm sorry, but I believe this changes are specific to a very limited set of user cases and cannot be included in the library. You can easily obtain the same result by conditionally add elements to the breadcrumb stack.

visoft commented 13 years ago

No problem, it's easy enough to create a custom builder (which I originally did https://gist.github.com/1070758) Just curious, but where would you ever want the "middle" item highlighted as the "active" item when a form is re-rendered if there is an error. It really looks odd, like so Home >> Widgets >> New. Is this code the wrong way to handle the controller? Technically, the user thinks that they are on the New (or Edit) Widget page, even though the URL doesn't represent it.