sql >> Base de Datos >  >> RDS >> PostgreSQL

¿Hay alguna manera de pasar parámetros a la consulta sin procesar de postgres en Rails?

Prueba find_by_sql :

Post.find_by_sql(["SELECT title FROM posts WHERE author = ? AND created > ?", author_id, start_date])

[#<Post:0x36bff9c @attributes={"title"=>"The Cheap Man Buys Twice"}>, ...]