7 lines
252 B
Ruby
7 lines
252 B
Ruby
class BatchesController < ApplicationController
|
|
def index
|
|
@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 |