Merge pull request #384 from Eric-Guo/rails-4.1

Escape wildcards for Mysql2 and PostgreSQL only