I have some code like this in a controller:
def index
@plays = current_user.plays.includes(:game).order("created_at desc")
@wants = current_user.wants.includes(:game).order("created_at desc")
@ratings = current_user.ratings.includes(:game).order("created_at desc")
@activities = (@plays + @wants + @ratings).sort_by {|a| a.created_at}.reverse
end
What I would like to do is paginate this using kaminari. To be clear I want all of these "activities" to be seen as one "feed" and paginate in the reverse created_at order. I don't want to paginate 5 of each type at a time or anything like that.
Any help you be great!