retrospring/app/controllers/question_controller.rb

11 lines
259 B
Ruby
Raw Normal View History

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