mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 14: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
29 lines
760 B
Ruby
29 lines
760 B
Ruby
class PagesController < ApplicationController
|
|
skip_before_action :authenticate_user!, only: %i[early_access]
|
|
|
|
def dashboard
|
|
@period = Period.from_key(params[:period], fallback: true)
|
|
@balance_sheet = Current.family.balance_sheet
|
|
@accounts = Current.family.accounts.active.with_attached_logo
|
|
|
|
@breadcrumbs = [ [ "Home", root_path ], [ "Dashboard", nil ] ]
|
|
end
|
|
|
|
def changelog
|
|
@release_notes = Provider::Github.new.fetch_latest_release_notes
|
|
|
|
render layout: "settings"
|
|
end
|
|
|
|
def feedback
|
|
render layout: "settings"
|
|
end
|
|
|
|
def early_access
|
|
redirect_to root_path if self_hosted?
|
|
|
|
@invite_codes_count = InviteCode.count
|
|
@invite_code = InviteCode.order("RANDOM()").limit(1).first
|
|
render layout: false
|
|
end
|
|
end
|