I have to sanitize a part of sql query. I can do something like this:
class << ActiveRecord::Base public :sanitize_sql end str = ActiveRecord::Base.sani
ActiveRecord::Base.connection.quote does the trick in Rails 3.x
ActiveRecord::Base.connection.quote