diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-01-11 20:11:28 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-11 13:45:09 -0800 |
commit | af96018c9171a9021f915ec63bd0baf4cf5a8e39 (patch) | |
tree | 8635834db6790116f4e84cd8466f71a6bef0ea4d /activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb | |
parent | 552df9b933e05a3c1d2508c316f1f2bd240accc5 (diff) | |
download | rails-af96018c9171a9021f915ec63bd0baf4cf5a8e39.tar.gz rails-af96018c9171a9021f915ec63bd0baf4cf5a8e39.tar.bz2 rails-af96018c9171a9021f915ec63bd0baf4cf5a8e39.zip |
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
Diffstat (limited to 'activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/belongs_to_polymorphic_association.rb | 5 |
1 files changed, 0 insertions, 5 deletions
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 |