sanitize_sql_for_conditions unnecessarily protected?

87 views
Skip to first unread message

James Coleman

unread,
Nov 2, 2015, 10:57:00 AM11/2/15
to rubyonra...@googlegroups.com
In ActiveRecord::Sanitization::ClassMethods, the method sanitize_sql_for_conditions and its aliases sanitize_sql and sanitize_conditions are marked as protected.

However, internally Rails makes several calls to this method via `send(:sanitize_sql...)` to bypass the protected nature of the method.

I believe that if it needs to be used via send then it probably shouldn't be marked as protected.

Is there any reason why we could remove the `protected` marker on this method and convert the `send` usages to normal method calls?
Reply all
Reply to author
Forward
0 new messages