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

Already on GitHub? Sign in to your account

Allow Fixnum values to be quoted #192

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
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.

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.

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

tamird commented Sep 16, 2014

obsolete, good to close

Member

vipulnsward commented Apr 11, 2016

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