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

Update README. #125

Closed dkinzer closed 5 years ago

dkinzer commented 5 years ago

The element options are taken from the :options field of the options hash passed into add_breadcrumb but the documentation seems to suggest otherwise.

This commit updates the documentation to reflect the correct usage.

weppos commented 5 years ago

Hello @dkinzer, the documentation is correct. You are confusing the instance method with the class method.

https://github.com/weppos/breadcrumbs_on_rails/blob/d389feac27b507e857462127118da46447be8136/lib/breadcrumbs_on_rails/action_controller.rb#L26-L28

dkinzer commented 5 years ago

@weppos, OK, but you might consider adding documentation with regards to this difference. As it can be very misleading to users.

I had one dev in my team waste a lot of time trying to get something to work as expected. Then I looked at the code and found out that both in the test case and in the code itself, the URL options are taken from :options field inside of the options param (I guess just in the case of the class method, but still confusing because of current docs).

See: