Add filters to index page

This commit is contained in:
Maximilian Grundke
2017-10-16 11:45:23 +02:00
parent 74a4313949
commit d162f78b67
3 changed files with 12 additions and 2 deletions

View File

@ -21,7 +21,8 @@ class UserExerciseFeedbacksController < ApplicationController
end
def index
@uefs = UserExerciseFeedback.order(:id).paginate(page: params[:page])
@search = UserExerciseFeedback.all.search params[:q]
@uefs = @search.result.includes(:execution_environment).order(:id).paginate(page: params[:page])
authorize!
end