retrospring/app/views/question/show.js.erb

9 lines
373 B
Text
Raw Normal View History

2015-01-03 19:24:51 +01:00
$('#answers').append('<% @answers.each do |answer|
2020-04-26 17:13:31 +02:00
%><%= j render 'answerbox', a: answer, show_question: false
2015-01-03 19:24:51 +01:00
%><% end %>');
<% if @more_data_available %>
$('#pagination').html('<%= j render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id %>');
2015-01-03 19:24:51 +01:00
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>