mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 21:29:38 +02:00
23 lines
458 B
Ruby
23 lines
458 B
Ruby
|
class Transactions::RowsController < ApplicationController
|
||
|
before_action :set_transaction, only: %i[ show update ]
|
||
|
|
||
|
def show
|
||
|
end
|
||
|
|
||
|
def update
|
||
|
@transaction.update! transaction_params
|
||
|
|
||
|
redirect_to transaction_row_path(@transaction)
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def transaction_params
|
||
|
params.require(:transaction).permit(:category_id)
|
||
|
end
|
||
|
|
||
|
def set_transaction
|
||
|
@transaction = Current.family.transactions.find(params[:id])
|
||
|
end
|
||
|
end
|