Fix question pagination

This commit is contained in:
Yuki 2015-07-25 23:18:27 +05:30
parent 6ea04faf4f
commit 21f2467f45
2 changed files with 3 additions and 2 deletions

View File

@ -1,3 +1,4 @@
- type ||= nil
.panel.panel-default.questionbox{data: { id: q.id }}
.panel-body
.media

View File

@ -1,8 +1,8 @@
$('#questions').append('<% @questions.each do |q|
%><%= j render 'shared/question', q: q
%><%= j render 'shared/question', q: q, type: nil
%><% end %>');
<% if @questions.next_page %>
$('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>');
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>
<% end %>