Use ActiveSupport's parameterize instead of a custom solution.