-
-
Save paulcsmith/a12b669bcc252d5683f2c90dfd3447b8 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
class UserQuery < User::BaseQuery | |
def sort_by_name | |
name.lower.desc_order | |
end | |
def only_adults | |
age.gte(18) # gte -> greater than or equal to | |
age.not(nil) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment