mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-01 19:45:19 +02:00
Account:: namespace simplifications and cleanup (#2110)
* Flatten Holding model * Flatten balance model * Entries domain renames * Fix valuations reference * Fix trades stream * Fix brakeman warnings * Fix tests * Replace existing entryable type references in DB
This commit is contained in:
parent
f181ba941f
commit
e657c40d19
172 changed files with 1297 additions and 1258 deletions
19
app/controllers/transactions/bulk_updates_controller.rb
Normal file
19
app/controllers/transactions/bulk_updates_controller.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
class Transactions::BulkUpdatesController < ApplicationController
|
||||
def new
|
||||
end
|
||||
|
||||
def create
|
||||
updated = Current.family
|
||||
.entries
|
||||
.where(id: bulk_update_params[:entry_ids])
|
||||
.bulk_update!(bulk_update_params)
|
||||
|
||||
redirect_back_or_to transactions_path, notice: "#{updated} transactions updated"
|
||||
end
|
||||
|
||||
private
|
||||
def bulk_update_params
|
||||
params.require(:bulk_update)
|
||||
.permit(:date, :notes, :category_id, :merchant_id, entry_ids: [], tag_ids: [])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue