diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-29 10:39:33 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-29 10:39:33 -0800 |
commit | 439a7dc0e62858a5ed1fc397e36626f9be1d7c87 (patch) | |
tree | fbd449e4ed2028689bbeead32280ceefd59c728d /activerecord/lib | |
parent | 28896a9f4ae0830726619bc479f69263acb80e4b (diff) | |
download | rails-439a7dc0e62858a5ed1fc397e36626f9be1d7c87.tar.gz rails-439a7dc0e62858a5ed1fc397e36626f9be1d7c87.tar.bz2 rails-439a7dc0e62858a5ed1fc397e36626f9be1d7c87.zip |
moving method to subclass that actually uses the method
Diffstat (limited to 'activerecord/lib')
2 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb index 5e5c01c77a..e7d1ffa9f2 100644 --- a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb +++ b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb @@ -123,6 +123,10 @@ module ActiveRecord Arel.sql(interpolate_sql(sanitize_sql(conditions, table_name))) end + def sanitize_sql(condition, table_name) + active_record.send(:sanitize_sql, condition, table_name) + end + def join_target_table(relation, *conditions) relation = relation.join(target_table, join_type) diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_part.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_part.rb index 0b093b65e9..cd16ae5a8b 100644 --- a/activerecord/lib/active_record/associations/class_methods/join_dependency/join_part.rb +++ b/activerecord/lib/active_record/associations/class_methods/join_dependency/join_part.rb @@ -14,7 +14,7 @@ module ActiveRecord # association. attr_reader :active_record - delegate :table_name, :column_names, :primary_key, :reflections, :sanitize_sql, :arel_engine, :to => :active_record + delegate :table_name, :column_names, :primary_key, :reflections, :arel_engine, :to => :active_record def initialize(active_record) @active_record = active_record |