I've written a patch for Arel to provide a feature similar to the ActiveSupport::SafeBuffer class that allows for by-passing some of Arel's quoting mechanisms when using, say, String#sql_safe, similar to #html_safe.
If anyone is still interested, I still have my patch sitting around
and have rebased it against master and it's still passing the Arel
test suite, so it should still be working okay. I can post the patch
or fork it to github or whatever if anyone wants to run with it.
Cheers.