Only show max the last 100 in UI cause fetching all breaks the app.

This commit is contained in:
Jan Renz
2015-04-28 18:44:00 +02:00
parent 89683dab9d
commit 13f13f5ecb

View File

@ -55,7 +55,7 @@ class SubmissionsController < ApplicationController
end
def index
@search = Submission.search(params[:q])
@search = Submission.last(100).search(params[:q])
@submissions = @search.result.includes(:exercise, :user).paginate(page: params[:page])
authorize!
end