Permalink
Browse files

test_with_polymorphic_and_condition works without the conditions meth…

…ods in BelongsToPolymorphicAssociation because the conditions are added straight to the association_scope as of a few days ago
  • Loading branch information...
1 parent 552df9b commit af96018c9171a9021f915ec63bd0baf4cf5a8e39 @jonleighton jonleighton committed with tenderlove Jan 11, 2011
@@ -4,11 +4,6 @@ module Associations
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

0 comments on commit af96018

Please sign in to comment.