Last active
September 20, 2016 10:10
-
-
Save MaxPleaner/c39bf16e8b036f262b19c9bccf0d01a1 to your computer and use it in GitHub Desktop.
priority merge example 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result_sets = { | |
top_rated: Post.all.order(rating: :desc).first(50), | |
top_rated_in_followed_topic: Post.all.where(topic_id: @user.followed_topics.pluck(:id)).order(rating: :desc).first(50) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment