Git Product home page Git Product logo

Comments (7)

link-er avatar link-er commented on September 24, 2024 1

It is. I displayed link_to_unless_current on page with the same link as was given to breadcrumbs and there wasn't link.
Nobody else got this problem with gem?
And, before update, the last wasn't link. Only after update, that's why I suppose that this can be bug.

from breadcrumbs_on_rails.

octavpo avatar octavpo commented on September 24, 2024

An element is not generated as a link only when its url is equal to the current page url.

from breadcrumbs_on_rails.

octavpo avatar octavpo commented on September 24, 2024

Works fine for me. So if you switch back to the previous version does it work fine? What version was that?

from breadcrumbs_on_rails.

link-er avatar link-er commented on September 24, 2024

Found the problem.
I also have installed gem twitter-bootstrap-rails and this caused the problem. Because it have exactly same methods - add_breadcrumb and render_breadcrumbs. And breadcrumbs were rendered by this gem, not by breadcrumbs_on_rails.
Will try to solve this...

from breadcrumbs_on_rails.

araslanov-e avatar araslanov-e commented on September 24, 2024

I have not installed gem twitter-bootstrap-rails, but last element is link too. What me do?

from breadcrumbs_on_rails.

borwahs avatar borwahs commented on September 24, 2024

@araslanov-e - does the below seem similar to your issue?

I am having this problem when I have a URL parameter that has a different case.

For example:

/collections/all/1 renders without the last element as a link.
/collections/All/1 renders with the last element as a link.

from breadcrumbs_on_rails.

borwahs avatar borwahs commented on September 24, 2024

The issue comes down to the link_to_unless_current method used by this gem. Since I used two different ways to generate the URL in my views, I noticed the difference in the URL. It doesn't look like link_to_unless_current ignores case (which is probably the right call).

I resolved this by checking the collection_piece_type param in my controller action to see if it contains any uppercase characters. If it does, I convert the specific param to lowercase and call redirect_to with the all lowercase version. It did not require any changes to this gem.

See ActionView::Helpers::UrlHelper.link_to_unless_current.

from breadcrumbs_on_rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.