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

fix name collision #54

Closed justame closed 8 years ago

justame commented 10 years ago

the method breadcrumbs is too common, i use Spree(https://github.com/spree/spree) and it overrides the method "breadcrumbs", so this is suggestion to solve this kind of issues.

weppos commented 10 years ago

I think it makes sense. To push it even further, I suggest to use breadcrumbs_on_rails instead of breadcrumbs_collection so that we prevent every possible issue.

Moreover, the main method should be breadcrumbs_on_rails including the instance variable

def breadcrumbs_on_rails
    @breadcrumbs_on_rails ||= []
end

and it should be aliased as breadcrumbs. Do you mind to make the changes?

weppos commented 10 years ago

Please also make sure to provide the corresponding test.

ngelx commented 10 years ago

What is the current state of this PR? I could help to implement this as I it need for a projects i'm working on.

ngelx commented 10 years ago

I've done the suggested changes on #65. Please take a look and let me know your thoughts.

weppos commented 8 years ago

Duplicates #65