adds pagination to 1st level comments in debate

Ref: #80
This commit is contained in:
Juanjo Bazán
2015-08-19 13:55:10 +02:00
committed by Juanjo Bazán
parent 10d7e9effe
commit 3732b7f420
3 changed files with 20 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ class DebatesController < ApplicationController
def show
set_debate_votes(@debate)
@comments = @debate.root_comments.with_hidden.recent
@comments = @debate.root_comments.with_hidden.recent.page(params[:page])
end
def new

View File

@@ -88,6 +88,7 @@
<% end %>
<%= render @comments %>
<%= paginate @comments %>
</div>
</div>
</section>