Skip to content

Commit

Permalink
test_with_polymorphic_and_condition works without the conditions meth…
Browse files Browse the repository at this point in the history
…ods in BelongsToPolymorphicAssociation because the conditions are added straight to the association_scope as of a few days ago
  • Loading branch information
jonleighton authored and tenderlove committed Jan 11, 2011
1 parent 552df9b commit af96018
Showing 1 changed file with 0 additions and 5 deletions.
Expand Up @@ -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
Expand Down

0 comments on commit af96018

Please sign in to comment.