rails/rails — pull request #11138 by neerajdotname (2013-06-27 09:51:16+00:00)
Title: if column is string then ensure that value is string too

The sql query for `User.where(id: '10')` will have the value '10'
in integer even though the value passed by in String format. That's
because proper quoting is applied and while applying the quoting it
was detected that column id is of type 'Integer'.

However the sql for `User.where(name: 10)` will not have the value 10
converted into string. That's because currently no quoting is applied
for Fixnum.

This PR fixes that. If the value is of type Integer and the column is of
type String then proper quoting is applied.

Please note that in order for this code to work properly arel needed a
bit of change. So only after this PR https://github.com/rails/arel/pull/192
is merged the changed code would work properly.

/cc @tenderlove