I have created a plugin named Gretel for making it easy and flexible to create breadcrumbs in Ruby on Rails.
Gretel::Crumbs.layout do crumb :root do link "Home", root_path end crumb :projects do link "Projects", projects_path end crumb :project do |project| link project.name, project_path(project) parent :projects end crumb :project_issues do |project| link "Issues", project_issues_path(project) parent :project, project end crumb :issue do |issue| link issue.name, issue_path(issue) parent :project_issues, issue.project end end
"You are here:", :separator => ">", :autoroot => true, :home_alone => true, :link_last => false %>
It’s as easy as that. Check out full documentation and installation at GitHub [http://github.com/lassebunk/gretel] .