Module: BreadcrumbsHelper
- Defined in:
- app/helpers/breadcrumbs_helper.rb
Instance Method Summary collapse
- #breadcrumb_home ⇒ Object
-
#build_breadcrumb(*args) ⇒ Object
Build breadcrumb navigation with flexible argument support.
Instance Method Details
#breadcrumb_home ⇒ Object
22 23 24 |
# File 'app/helpers/breadcrumbs_helper.rb', line 22 def link_to fa_icon('house'), cms_link('/') end |
#build_breadcrumb(*args) ⇒ Object
Build breadcrumb navigation with flexible argument support
Examples:
build_breadcrumb({ href: images_path, title: 'Images' }, { title: 'Edit Image Uploads' })
build_breadcrumb(@object, 'Edit')
build_breadcrumb('Edit Images Uploads') # Legacy support
build_breadcrumb({ href: customers_path, title: 'Customers' }, @customer, 'Edit')
16 17 18 19 20 |
# File 'app/helpers/breadcrumbs_helper.rb', line 16 def (*args) # Extract context from the last argument if it's a hash context = args.last.is_a?(Hash) ? args.pop : {} Crm::BreadcrumbPresenter.new(args, context). end |