Many of the connection query methods that come with ActiveRecord accept an optional binds parameter. This can be used to safely inject parameters into the query.
[!INCLUDE[SQL Server Azure SQL Database Synapse Analytics PDW](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw.md)] Each parameter marker in a SQL statement ...