Datamapper (0.9.11) fails to quote floats (typo bug)
Reported by Adam Luter | April 16th, 2009 @ 07:57 AM
case column_value
when String
if (integer = column_value.to_i).to_s == column_value
quote_column_value(integer)
elsif (float = column_value.to_f).to_s == column_value
quote_column_value(integer)
else
"'#{column_value.gsub("'", "''")}'"
end
Under float should read "quote_column_value(float)".
Comments and changes to this ticket
-
Dan Kubb (dkubb) May 28th, 2009 @ 07:18 PM
- State changed from unconfirmed to accepted
- Assigned user set to Dan Kubb (dkubb)
-
Dan Kubb (dkubb) June 7th, 2009 @ 02:11 AM
- State changed from accepted to resolved
All of the DB quoting logic has been moved to the DataObjects project, which DM just delegates to. I checked the String, and Numeric quoting to make sure the bug does not exist there, and I can confirm it does not. Marking this ticket as resolved.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »