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

:title in options do not work #113

Closed devyani9999 closed 6 years ago

devyani9999 commented 6 years ago

add_breadcrumb "index", index_path, :title => "Back to the Index" does not change the title of 'index' to 'Back to Index'. I also tried add_breadcrumb "index", index_path, {:title => "Back to the Index}" but it doesn't work either. Is the title in options discontinued?

weppos commented 6 years ago

This works if you use the controller instance method. If you use the class method, you need to wrap it into :options.

See https://github.com/weppos/breadcrumbs_on_rails/blob/master/lib/breadcrumbs_on_rails/action_controller.rb#L74