I have the following Arel SQL: I get SQL Injection warning when I run brakeman. I tried the following: However, I get the following error: How do I sanitize sql statement with Arel? Answer I am answering my own question. I am using Arel following the Github wiki for Ransack gem. I was doing something very similar to point #