mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:29:52 +01:00
14 lines
319 B
Ruby
14 lines
319 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Answer::TimelineMethods
|
|
include CursorPaginatable
|
|
|
|
define_cursor_paginator :cursored_public_timeline, :public_timeline
|
|
|
|
def public_timeline
|
|
joins(:user)
|
|
.where(users: { privacy_allow_public_timeline: true })
|
|
.order(:created_at)
|
|
.reverse_order
|
|
end
|
|
end
|