diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-12-11 11:41:27 +0900 |
---|---|---|
committer | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2017-12-13 07:54:25 +0900 |
commit | 9d43a84f73c1b3853a91d052a462ee60eccaf957 (patch) | |
tree | 1f8f8cb73ddb1e88293f2fbfc58adb4fc0caa107 /activerecord/lib/active_record/relation/where_clause_factory.rb | |
parent | 185a30f75289ab158abd3c21536930c37af61338 (diff) | |
download | rails-9d43a84f73c1b3853a91d052a462ee60eccaf957.tar.gz rails-9d43a84f73c1b3853a91d052a462ee60eccaf957.tar.bz2 rails-9d43a84f73c1b3853a91d052a462ee60eccaf957.zip |
Make `sanitize_sql_` methods public
Currently, sanitize methods are private. So need `send` to use from
outside class.
However, sometimes want to use sanitize methods from outside Class when
want to generate SQL including multiple tables like search.
In order to avoid using `send` in such a case, changed methods to public.
Diffstat (limited to 'activerecord/lib/active_record/relation/where_clause_factory.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/where_clause_factory.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/where_clause_factory.rb b/activerecord/lib/active_record/relation/where_clause_factory.rb index 1374785354..4ae94f4bfe 100644 --- a/activerecord/lib/active_record/relation/where_clause_factory.rb +++ b/activerecord/lib/active_record/relation/where_clause_factory.rb @@ -11,7 +11,7 @@ module ActiveRecord def build(opts, other) case opts when String, Array - parts = [klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))] + parts = [klass.sanitize_sql(other.empty? ? opts : ([opts] + other))] when Hash attributes = predicate_builder.resolve_column_aliases(opts) attributes = klass.send(:expand_hash_conditions_for_aggregates, attributes) |