Breadcrumb
Displays the path to the current resource using a hierarchy of links.
Anatomy
Breadcrumb do |b|b.item dob.linkendb.separatorb.item dob.pageendend
API Reference
Breadcrumb
| Name | Type | |
|---|---|---|
attributes | keyword arguments |
Breadcrumb#item
| Name | Type | |
|---|---|---|
attributes | keyword arguments |
Breadcrumb#link
Rails link_to helper that renders a breadcrumb link.
| Name | Type | Default |
|---|---|---|
name | string | nil |
| The link text to display. | ||
options | string/hash | nil |
| The URL or Rails route options. | ||
html_options | hash | nil |
| Additional HTML attributes for the link element. | ||
Breadcrumb#separator
| Name | Type | |
|---|---|---|
attributes | keyword arguments |
Breadcrumb#page
| Name | Type | |
|---|---|---|
attributes | keyword arguments |
Breadcrumb#ellipsis
| Name | Type | |
|---|---|---|
attributes | keyword arguments |
Breadcrumb#links (Builder)
Convenience method to build breadcrumb navigation from a collection of items automatically.
| Name | Type | Default |
|---|---|---|
required collection | array | |
Array of hashes with { name: string, path: string } structure. The last item automatically becomes a page instead of a link, and separators are inserted between items. | ||
Examples
On This Page