Retrospring/app/controllers/question_controller.rb

11 lines
259 B
Ruby
Raw Normal View History

2014-12-07 11:51:44 -08:00
class QuestionController < ApplicationController
def show
@question = Question.find(params[:id])
2015-01-03 10:24:51 -08:00
@answers = @question.answers.reverse_order.paginate(page: params[:page])
respond_to do |format|
format.html
format.js
end
2014-12-07 11:51:44 -08:00
end
end