Retrospring/app/models/user/relationship_methods.rb

17 lines
389 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module User::RelationshipMethods
include CursorPaginatable
2021-12-31 13:19:21 -08:00
define_cursor_paginator :cursored_followings, :ordered_followings
define_cursor_paginator :cursored_followers, :ordered_followers
2021-12-31 13:19:21 -08:00
def ordered_followings
followings.reverse_order.includes(:profile)
end
def ordered_followers
followers.reverse_order.includes(:profile)
end
end