Class: Cats::Core::ReceiptTransactionsController
Instance Method Summary
collapse
Methods included from Common
#create, #show, #update
#authenticate, #current_user, #skip_bullet
Instance Method Details
#filter ⇒ Object
13
14
15
16
|
# File 'app/controllers/cats/core/receipt_transactions_controller.rb', line 13
def filter
query = ReceiptTransaction.ransack(params[:q])
render json: {success: true, data: serialize(query.result)}
end
|
#index ⇒ Object
6
7
8
9
10
11
|
# File 'app/controllers/cats/core/receipt_transactions_controller.rb', line 6
def index
super do
ReceiptTransaction.includes(:destination, {receipt_authorization: :dispatch}, :unit)
.where(receipt_authorization_id: params[:id])
end
end
|