mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Consolidate and simplify account pages (#2462)
* Remove ScrollFocusable * Consolidate and simplify account pages * Lint fixes * Fix tab param initialization * Remove stale files * Remove stale route, make accountable routes clearer
This commit is contained in:
parent
3eea5a9891
commit
8c97c9d31a
41 changed files with 252 additions and 269 deletions
|
@ -1,5 +1,5 @@
|
|||
class TransactionsController < ApplicationController
|
||||
include ScrollFocusable, EntryableResource
|
||||
include EntryableResource
|
||||
|
||||
before_action :store_params!, only: :index
|
||||
|
||||
|
@ -21,12 +21,7 @@ class TransactionsController < ApplicationController
|
|||
:transfer_as_inflow, :transfer_as_outflow
|
||||
)
|
||||
|
||||
@pagy, @transactions = pagy(base_scope, limit: per_page, params: ->(p) { p.except(:focused_record_id) })
|
||||
|
||||
# No performance penalty by default. Only runs queries if the record is set.
|
||||
if params[:focused_record_id].present?
|
||||
set_focused_record(base_scope, params[:focused_record_id], default_per_page: per_page)
|
||||
end
|
||||
@pagy, @transactions = pagy(base_scope, limit: per_page)
|
||||
end
|
||||
|
||||
def clear_filter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue