retrospring/app/models/question/answer_methods.rb
2020-04-20 23:13:24 +02:00

13 lines
245 B
Ruby

# frozen_string_literal: true
module Question::AnswerMethods
include CursorPaginatable
define_cursor_paginator :cursored_answers, :ordered_answers
def ordered_answers
answers
.order(:created_at)
.reverse_order
end
end