This gem is a simple and smart way to change all breadcrumbs of your project from breadcrumb_on_rails to gretel.
Gem is not ready for prodution yet ; )
breadcrumb_on_rails is a really simple tool for managing breadcrumbs, but writing breadcrumbs´s logics inside the controllers seem awful for me and should be in the view, I was having a lot of problems managing the visibility of breadcrumbs for specific users, when I realized breadcrumb_on_rails was not a good choice it was too late, there was a lot breadcrumbs in my applications and I need a tool to make a full conversion of breadcrumb manager. The main problem is breadcrumb_on_rails and gretel are very different, gretel organize breadcrumbs inside a config folder and breadcrumb_on_rails does that inside the controllers.
Sorry for the bad English : )
Add this line to your application's Gemfile:
gem 'breadcrumbs_on_rails_to_gretel'
Dont forget to add this gem to development group
And then execute:
$ bundle
-
Rails 3.x or Rails 4.x
-
Ruby >= 2.0.0
Please note
- Rails 4 and 2 was not tested
Simple run the rake task:
rake breadcrumbs_on_rails_to_gretel:convert
This task will seach for add_breadcrumb in all controllers, it also add the gretel´s breadcrumb in your views, and organize all breadcrumbs for you.
- Fork it ( https://github.com/victor95pc/breadcrumbs_on_rails_to_gretel/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Report issues or feature requests to GitHub Issues.
BreadcrumbsOnRailsToGretel is Copyright (c) 2015 Victor Palomo de Castro. This is Free Software distributed under the MIT license.