moving method to subclass that actually uses the method

This commit is contained in:
Aaron Patterson
2010-11-29 10:39:33 -08:00
parent 28896a9f4a
commit 439a7dc0e6
2 changed files with 5 additions and 1 deletions

View File

@@ -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)

View File

@@ -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