From af96018c9171a9021f915ec63bd0baf4cf5a8e39 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Tue, 11 Jan 2011 20:11:28 +0000 Subject: test_with_polymorphic_and_condition works without the conditions methods in BelongsToPolymorphicAssociation because the conditions are added straight to the association_scope as of a few days ago --- .../active_record/associations/belongs_to_polymorphic_association.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb b/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb index cae35fe0d0..4f67b02d00 100644 --- a/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb +++ b/activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb @@ -4,11 +4,6 @@ module ActiveRecord class BelongsToPolymorphicAssociation < BelongsToAssociation #:nodoc: private - def conditions - @conditions ||= interpolate_sql(target_klass.send(:sanitize_sql, @reflection.options[:conditions])) if @reflection.options[:conditions] - end - alias :sql_conditions :conditions - def replace_keys(record) super @owner[@reflection.foreign_type] = record && record.class.base_class.name -- cgit v1.2.3