# File lib/active_record/base.rb, line 1303 def sanitize_sql_hash_for_conditions(attrs, default_table_name = self.table_name) attrs = expand_hash_conditions_for_aggregates(attrs) table = Arel::Table.new(self.table_name, :engine => arel_engine, :as => default_table_name) builder = PredicateBuilder.new(arel_engine) builder.build_from_hash(attrs, table).map{ |b| b.to_sql }.join(' AND ') end