Skip to content
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

Remove unneccessary special case for money in quoting #16037

Merged
merged 1 commit into from
Jul 4, 2014

Conversation

sgrif
Copy link
Contributor

@sgrif sgrif commented Jul 3, 2014

No description provided.

@rafaelfranca
Copy link
Member

Tests are broken

@sgrif
Copy link
Contributor Author

sgrif commented Jul 3, 2014

Updated

@@ -45,14 +45,6 @@ def test_quote_float_infinity
assert_equal "'Infinity'", @conn.quote(infinity, c)
end

def test_quote_cast_numeric
fixnum = 666
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this test doesn't mean that now integer are not being quoted when the column type is a string? I guess this would cause an SQL error. Does we have tests to ensure it is working?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think there's a test for this. It's perfectly valid to provide a number for a string column, so I felt like we would be testing PG not Rails. I'll provide a test if you think we should, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, if it is perfect valid why we were quoting? I think is better to add a test to make sure it works.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No clue why were quoting. I'll add a test...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test added.

@sgrif
Copy link
Contributor Author

sgrif commented Jul 3, 2014

This should be good, now.

rafaelfranca added a commit that referenced this pull request Jul 4, 2014
Remove unneccessary special case for money in quoting
@rafaelfranca rafaelfranca merged commit 295f2bd into rails:master Jul 4, 2014
@sgrif sgrif deleted the sg-money-quoting branch March 14, 2018 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants