Last active
August 29, 2015 14:18
-
-
Save LNA/f01586198068b9f4a033 to your computer and use it in GitHub Desktop.
Search values of Large Query
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
students = YogaStudent.find(:all, :limit => 10) | |
# will return an array with 10 random yoga student records | |
ashtanga_students = students.select { |student| student[:xml].match(/ashtanga/) } | |
# will look only at the xml keys to match ashtanga in the values. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment