edti dashboard

This commit is contained in:
Sunandar
2017-01-31 11:33:00 +06:30
parent 8085d311ab
commit 58dcf588df
6 changed files with 93 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
class BatchesController < ApplicationController
def index
@batches=Batch.all.page(params[:page]).per(2)
@batches=Batch.joins('inner join users on users.id=batches.user_id')
.select('batches.*,users.name as user_name').order('batches.id desc').page(params[:page])
end
end