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 `sanitize_conditions` and use `sanitize_sql` instead of `sanitize_conditions` #25999

Merged
merged 1 commit into from Aug 19, 2016

Conversation

Projects
None yet
5 participants
@kamipo
Member

kamipo commented Jul 31, 2016

Because sanitize_conditions protected method is only used in one place.

@rails-bot

This comment has been minimized.

Show comment
Hide comment
@rails-bot

rails-bot Jul 31, 2016

r? @schneems

(@rails-bot has picked a reviewer for you, use r? to override)

r? @schneems

(@rails-bot has picked a reviewer for you, use r? to override)

@@ -36,8 +36,7 @@ def sanitize_sql_for_conditions(condition)
else condition
end
end
alias_method :sanitize_sql, :sanitize_sql_for_conditions
alias_method :sanitize_conditions, :sanitize_sql

This comment has been minimized.

@rafaelfranca

rafaelfranca Aug 17, 2016

Member

While it is only used internally in one place it is a public API method. Could you add a deprecation message and a CHANGELOG entry?

@rafaelfranca

rafaelfranca Aug 17, 2016

Member

While it is only used internally in one place it is a public API method. Could you add a deprecation message and a CHANGELOG entry?

This comment has been minimized.

@kamipo

kamipo Aug 17, 2016

Member

This is a protected method. Should we add a CHANGELOG entry?

@kamipo

kamipo Aug 17, 2016

Member

This is a protected method. Should we add a CHANGELOG entry?

This comment has been minimized.

@kamipo

kamipo Aug 17, 2016

Member

Oh... I see. I'll add a CHANGELOG entry later.

@kamipo

kamipo Aug 17, 2016

Member

Oh... I see. I'll add a CHANGELOG entry later.

Deprecate `sanitize_conditions`. Use `sanitize_sql` instead
Because `sanitize_conditions` protected method is only used in one place.
@kamipo

This comment has been minimized.

Show comment
Hide comment
@kamipo

kamipo Aug 17, 2016

Member

I added a deprecation message and a CHANGELOG entry.

Member

kamipo commented Aug 17, 2016

I added a deprecation message and a CHANGELOG entry.

@rafaelfranca rafaelfranca merged commit c2af081 into rails:master Aug 19, 2016

2 checks passed

codeclimate Code Climate didn't find any new or fixed issues.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@kamipo kamipo deleted the kamipo:remove_sanitize_conditions branch Aug 19, 2016

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