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

Fix the undefined method `delete_if' for "":String query URL like below.
changed wildcard escape logic

(cherry picked from commit b6d2547a0d8369b7d1e3ba13bd5ed3fe95118d72)