New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Fixnum values to be quoted #192

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@neerajdotname
Member

neerajdotname commented Jun 27, 2013

Currently User.where(id: '10') would result in query where the
value is integer 10 instead of string 10. That's because id column is
of type 'Integer`.

However User.where(name: 10) would not result in value in string even though column name is of type "string"

This PR allows "Fixnum" to be quoted so that in ActiveRecord proper
quoting can be done based on column type.

Please see rails/rails#11138 for the changes in ActiveRecord side.

Neeraj Singh
Allow Fixnum values to be quoted
Currently `User.where(id: '10')` would result in query where the
value is integer 10 instead of string 10. That's because id column is
of type 'Integer`.

However `User.where(name: 10)` would not result in value in string even
though name column is of type 'String'.

This PR allows "Fixnum" to be quoted so that in ActiveRecord proper
quoting can be done based on column type.
@dylanahsmith

This comment has been minimized.

dylanahsmith commented Dec 7, 2013

This appears to be a duplicate of pull #162, although is missing quoting for bignum.

@tamird

This comment has been minimized.

tamird commented Sep 16, 2014

obsolete, good to close

@vipulnsward

This comment has been minimized.

Member

vipulnsward commented Apr 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment