This only applies to ActiveRecord, I wonder if e.g. DataMapper is vulnerable in a similar way.
As an example, the following
User.all(':email '=> {':id' => '1"'})
will throw ArgumentError: condition ":email " does not map to a property or relationship in User
because of the space before any SQL request is performed.
and User.all(':email '=> {':id' => '1"'})
will create the following query: Query SELECT `id`, `email`, `password` FROM `users` WHERE `email` IN ('[":id", "1\""]') ORDER BY `id`
120602 8:41:03 3 Quit