1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-07 14:35:23 +02:00

Fix tab param initialization

This commit is contained in:
Zach Gollwitzer 2025-07-18 05:26:17 -04:00
parent 0a90a208f0
commit e7faa24f02
3 changed files with 3 additions and 2 deletions

View file

@ -19,7 +19,7 @@ class UI::AccountPage < ApplicationComponent
end
def active_tab
tabs.find { |tab| tab == @active_tab } || tabs.first
tabs.find { |tab| tab == @active_tab&.to_sym } || tabs.first
end
def tabs

View file

@ -11,6 +11,7 @@ class AccountsController < ApplicationController
def show
@chart_view = params[:chart_view] || "balance"
@tab = params[:tab]
@q = params.fetch(:q, {}).permit(:search)
entries = @account.entries.search(@q).reverse_chronological

View file

@ -2,5 +2,5 @@
account: @account,
chart_view: @chart_view,
chart_period: @period,
active_tab: @active_tab
active_tab: @tab
) %>