Last active
August 29, 2015 14:12
-
-
Save viniciusalonso/883f9262ee6fd899326f 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
# Using pure SQL | |
SELECT name FROM students WHERE name LIKE 'input_text%' | |
# Or you can use activerecored query | |
Student.select(:name).where("name LIKE '#{params[:input_text]}%'") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment