Add pagination and checking for more results to search.

This commit is contained in:
Jakub Macina
2017-07-20 18:12:34 +02:00
parent 7b40de5ac4
commit e5ee4ccc48
2 changed files with 28 additions and 13 deletions

View File

@@ -13,7 +13,10 @@ class SearchController < ApplicationController
type_filter: 'topic',
guardian: guardian,
include_blurbs: true,
blurb_length: 300
blurb_length: 300,
page: if params[:page].to_i <= 10
[params[:page].to_i, 1].max
end
}
context, type = lookup_search_context