TIL rails prepared statement postgres

When using ActiveRecord::Base.connection to use prepared statements with PostgreSQL you have to use $1,$2 etc. not ? like in MySQL.

That means the statements are going to be database specific. So make sure you wrap things up in if...else blocks if you use multiple databases across different environments.


Read More...