Commit e3dc81e0 by tady

pagenation in searhc page.

parent 832b6989
...@@ -8,6 +8,6 @@ class SearchController < ApplicationController ...@@ -8,6 +8,6 @@ class SearchController < ApplicationController
end end
@count = scope.count @count = scope.count
@posts = scope.limit(100).decorate @posts = scope.page(params[:page]).decorate
end end
end end
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
.list-group .list-group
- @posts.each do |_post| - @posts.each do |_post|
= render partial: 'posts/large_item', locals: { post: _post } = render partial: 'posts/large_item', locals: { post: _post }
= paginate(@posts)
.col-xs-4 .col-xs-4
.panel.panel-default .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