Answer the question
In order to leave comments, you need to log in
How to fix a bug in the rails gem (breadcrumbs on rails)?
I do everything according to the instructions exactly like the author of the gem: https://github.com/weppos/breadcrumbs_on_rails I have already started creating a controller like his with the same name. All in all it gives me this error:
undefined method `add_breadcrumb' for MyController:Class
gem "breadcrumbs_on_rails"
bundle install
class MyController
add_breadcrumb "home", :root_path
add_breadcrumb "my", :my_path
def index
add_breadcrumb "index", index_path
end
end
undefined method `add_breadcrumb' for MyController:Class
Answer the question
In order to leave comments, you need to log in
The easiest way to fix a gem is to write a monkey patch for the gem method. And immediately on the github to fix it in the near future. Until then, use the monkey patch.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question