add new api

This commit is contained in:
Sunandar
2017-02-03 17:56:27 +06:30
parent b4c9e8cc8e
commit 538c898e06
12 changed files with 117 additions and 75 deletions

View File

@@ -8,7 +8,7 @@ class BatchLineItemsController < ApplicationController
@batches=Batch.where('user_id=?',user_id)
@batchLineItems=BatchLineItem.joins('inner join batches on batches.id=batch_line_items.batch_id')
.where('batches.user_id=?',user_id)
.select('batch_line_items.*,batches.order_ref as batch_name').page(params[:page]).per(2)
.select('batch_line_items.*,batches.order_ref as batch_name').page(params[:page])
end
def export
batch_list=params[:batch]