mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
* Add breadcrumbs support across application Fixes #1896 * Potential fix for tests * Simplify breadcrumbs implementation Remove complex breadcrumbs logic from controllers and concern, replacing with a simpler default approach that sets a basic breadcrumb based on the current controller name * Refactor page header and breadcrumbs rendering Remove complex breadcrumbs helper method and update layout to use more flexible content_for approach for page headers and breadcrumbs * Add fallback breadcrumbs rendering to settings layout
13 lines
316 B
Ruby
13 lines
316 B
Ruby
module Breadcrumbable
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
before_action :set_breadcrumbs
|
|
end
|
|
|
|
private
|
|
# The default, unless specific controller or action explicitly overrides
|
|
def set_breadcrumbs
|
|
@breadcrumbs = [ [ "Home", root_path ], [ controller_name.titleize, nil ] ]
|
|
end
|
|
end
|