foodsoft/app/controllers/api/v1/financial_transactions_controller.rb
viehlieb e37ad34901
Some checks failed
continuous-integration/drone/push Build is failing
mv lib to app/lib use :zeitwerk
2022-10-18 17:23:18 +02:00

23 lines
448 B
Ruby

class Api::V1::FinancialTransactionsController < Api::V1::BaseController
include CollectionScope
before_action -> { doorkeeper_authorize! 'finance:read', 'finance:write' }
def index
render_collection search_scope
end
def show
render json: scope.find(params.require(:id))
end
private
def scope
FinancialTransaction.includes(:user, :financial_transaction_type)
end
def ransack_auth_object
:finance
end
end