{"id":20269907,"url":"https://github.com/teliosdev/breadcrumb_trail","last_synced_at":"2026-05-30T21:31:29.389Z","repository":{"id":27371020,"uuid":"30846551","full_name":"teliosdev/breadcrumb_trail","owner":"teliosdev","description":"Easy breadcrumbs.  Yay.","archived":false,"fork":false,"pushed_at":"2016-07-03T00:56:54.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-16T20:16:34.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teliosdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-15T23:38:22.000Z","updated_at":"2016-07-03T00:48:07.000Z","dependencies_parsed_at":"2022-09-02T03:30:28.998Z","dependency_job_id":null,"html_url":"https://github.com/teliosdev/breadcrumb_trail","commit_stats":null,"previous_names":["medcat/breadcrumb_trail"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/teliosdev/breadcrumb_trail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teliosdev%2Fbreadcrumb_trail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teliosdev%2Fbreadcrumb_trail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teliosdev%2Fbreadcrumb_trail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teliosdev%2Fbreadcrumb_trail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teliosdev","download_url":"https://codeload.github.com/teliosdev/breadcrumb_trail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teliosdev%2Fbreadcrumb_trail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33711018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T12:28:00.153Z","updated_at":"2026-05-30T21:31:29.371Z","avatar_url":"https://github.com/teliosdev.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Breadcrumb Trail\n[![Code Climate](https://codeclimate.com/github/medcat/breadcrumb_trail/badges/gpa.svg)](https://codeclimate.com/github/medcat/breadcrumb_trail) [![Build Status](https://travis-ci.org/medcat/breadcrumb_trail.svg)](https://travis-ci.org/medcat/breadcrumb_trail) [![Test Coverage](https://codeclimate.com/github/medcat/breadcrumb_trail/badges/coverage.svg)](https://codeclimate.com/github/medcat/breadcrumb_trail)\n\nHelps you create a breadcrumb system for your Rails application.\nBetter than any other library, guaranteed\u003csup\u003e*\u003c/sup\u003e.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'breadcrumb_trail'\n```\n\nAnd you're done!\n\n## Usage\n\nThe gem adds some nice methods to your controller:\n\n```Ruby\n# app/controllers/application_controller.rb\nclass ApplicationController \u003c ActionController::Base\n\n  breadcrumb name: \"Home\", path: :root_path\nend\n```\n\n```Ruby\n# app/controllers/articles_controller.rb\nclass ArticlesController \u003c ApplicationController\n  breadcrumb name: \"Articles\", path: :articles_path\n\n  def show\n    @article = Article.find(params[:id])\n    breadcrumb name: @article.name, path: article_path(@article)\n    breadcrumbs # =\u003e returns all of your breadcrumbs\n  end\nend\n```\n\n```HTML\n\u003c!-- app/views/layouts/application.html.erb --\u003e\n\u003c!-- ... --\u003e\n\u003c%= render_breadcrumbs outer: \"ul\" %\u003e\n\u003c!-- ... --\u003e\n```\n\n...all results in _(with some assumptions)_:\n\n```HTML\n\u003c!-- ... --\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ca href=\"/\"\u003eHome\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"/articles\"\u003eArticles\u003c/a\u003e\u003c/li\u003e\n  \u003cli\u003e\u003ca href=\"/articles/1\"\u003eHello, World\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c!-- ... --\u003e\n```\n\nYou can pass `#breadcrumb` some options, which it'll use as\nHTML options by default.\n\nSimple, right?\n\n### Builders\n\n`#render_breadcrumbs` takes an option for a builder, or defaults to\none if you don't provide it.  There are two default builders:\n`HTMLBuilder` and `BlockBuilder`.  If you provide a block to\n`#render_breadcrumbs`, then `BlockBuilder` is used; otherwise,\n`HTMLBuilder` is used.\n\n#### `HTMLBuilder`\n\n`HTMLBuilder` builds a sensible block of HTML based on some options.\nThe exact options you can provide are:\n\n- `outer`: The outer tag that is used.  The default for this is `ol`.\n  If this is `nil`, then no outer tag is rendered.\n- `inner`: The inner tag that is used.  The default for this is `li`.\n  If this is `nil`, then no inner tag is rendered.\n- `outer_options`: The html attributes that are used for the outer\n  tag.  By default, there are no options.  If you want to add\n  `class=\"some-class\"`, this is the place to provide it.\n- `inner_options`: The html attributes that are used for the inner\n  tag.  By default, there are no options.  If you want to add\n  `class=\"some-class\"`, this is the place to provide it.\n\nThat's it!\n\n#### `BlockBuilder`\n\n`BlockBuilder` yields each breadcrumb to the given block.  Each\nbreadcrumb has three attributes: `name`, `path`, and `options`.\nTo recreate the default output of `HTMLBuilder`, you'd have to do\nthis with `BlockBuilder`:\n\n```\n\u003c!-- ... --\u003e\n\u003col\u003e\n\u003c%= render_breadcrumbs do |breadcrumb| %\u003e\n  \u003cli\u003e\u003c%= link_to(breadcrumb.name, breadcrumb.path, breadcrumb.options) %\u003e\u003c/li\u003e\n\u003c%= end %\u003e\n\u003c/ol\u003e\n\u003c!-- ... --\u003e\n```\n\n#### Your Own Builder\n\nYou don't have to use one of these.  You can use your own builder.\nHowever, if you're using a builder because the default builders don't\nprovide a feature you like, open an issue!\n\nYour builder only needs to subclass `BreadcrumbTrail::Builder` and\ndefine the method `#call`, and that's it!  Then, you pass the builder\nto `#render_breadcrumbs` with the `builder` option:\n\n```\n\u003c!-- ... --\u003e\n\u003c%= render_breadcrumbs builder: MyCustomBuilder %\u003e\n\u003c!-- ... --\u003e\n```\n\nAny options passed to `#render_breadcrumbs` are passed to your\nbuilder's `#initialize` via the last argument.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/medcat/breadcrumb_trail/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n\u003csup\u003e*\u003c/sup\u003e: Not guaranteed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteliosdev%2Fbreadcrumb_trail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteliosdev%2Fbreadcrumb_trail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteliosdev%2Fbreadcrumb_trail/lists"}