Class: Api::V1::User::FinancialTransactionsController
- Inherits:
-
BaseController
- Object
- BaseController
- Api::V1::User::FinancialTransactionsController
- Includes:
- Concerns::CollectionScope
- Defined in:
- app/controllers/api/v1/user/financial_transactions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/api/v1/user/financial_transactions_controller.rb', line 17 def create transaction_type = FinancialTransactionType.find(create_params[:financial_transaction_type_id]) ft = current_ordergroup.add_financial_transaction!(create_params[:amount], create_params[:note], current_user, transaction_type) render json: ft end |
#index ⇒ Object
9 10 11 |
# File 'app/controllers/api/v1/user/financial_transactions_controller.rb', line 9 def index render_collection search_scope end |
#show ⇒ Object
13 14 15 |
# File 'app/controllers/api/v1/user/financial_transactions_controller.rb', line 13 def show render json: scope.find(params.require(:id)) end |