I have a table named User
(Created by Devise), and a column school
, of type string.
Some example values for school
: "0"
, "1"
, "012"
, "023"
.
I want to select rows that include "0"
in the value. Similar to how #include?
works in Ruby. E.g.:
"012".include?("0") == true
"1".include?("0") == false
How can I do this with an ActiveRecord
query?