Commit e3dc81e0 by tady

pagenation in searhc page.

parent 832b6989
......@@ -8,6 +8,6 @@ class SearchController < ApplicationController
end
@count = scope.count
@posts = scope.limit(100).decorate
@posts = scope.page(params[:page]).decorate
end
end
......@@ -10,6 +10,7 @@
.list-group
- @posts.each do |_post|
= render partial: 'posts/large_item', locals: { post: _post }
= paginate(@posts)
.col-xs-4
.panel.panel-default
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment