Created
December 16, 2016 20:53
-
-
Save arturopie/91588b4cada9328ce63b2441653f1e04 to your computer and use it in GitHub Desktop.
This file contains 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
posts = IndexQueryBuilder.query Post, with: filters do |query| | |
query.filter_field [:comments, :text], contains: :comment_text | |
query.order_by "view_count DESC" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment