I am trying to query my database with a boolean type that is passed to me through the controller as a string. What Rails attempts to do is the following:
SELECT "orders".* FROM "orders" WHERE "orders"."complete" = ? [["complete", "false"]]
This yields an empty array which should not be the case. Having tried manually retrieving records via the rails console, I come up with the same results. However substituting "false" for "f" solves the problem.
It is not an ideal solution to use "f" as a substitute because I am using emberjs and the boolean type in my frontend models which by default sends up "true" or "false"
Why wont ActiveRecord accept full booleans as string and how can I make it do so?