Retrospring/app/controllers/question_controller.rb

14 lines
426 B
Ruby
Raw Normal View History

2014-12-07 11:51:44 -08:00
class QuestionController < ApplicationController
def show
@question = Question.find(params[:id])
@answers = @question.cursored_answers(last_id: params[:last_id])
@answers_last_id = @answers.map(&:id).min
@more_data_available = !@question.cursored_answers(last_id: @answers_last_id, size: 1).count.zero?
2015-01-03 10:24:51 -08:00
respond_to do |format|
format.html
2020-05-08 19:39:09 -07:00
format.js { render layout: false }
2015-01-03 10:24:51 -08:00
end
2014-12-07 11:51:44 -08:00
end
end