paginates booths

This commit is contained in:
Juanjo Bazán
2017-02-14 19:09:31 +01:00
parent 8129131a3c
commit 2b68f02b95
2 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ class Admin::Poll::BoothAssignmentsController < Admin::BaseController
before_action :load_poll, except: [:create, :destroy]
def index
@booth_assignments = @poll.booth_assignments.includes(:booth)
@booth_assignments = @poll.booth_assignments.includes(:booth).order('poll_booths.name').page(params[:page]).per(50)
end
def search_booths