Skip to content
Browse files

Now we can drop-kick AssociationReflection#dependent_conditions into …

…oblivion.
  • Loading branch information...
1 parent 38fbfa6 commit b0bb911fa1923d809b6e4fc120cc1adc0b8dc321 @jonleighton jonleighton committed Dec 30, 2010
Showing with 0 additions and 11 deletions.
  1. +0 −11 activerecord/lib/active_record/reflection.rb
View
11 activerecord/lib/active_record/reflection.rb
@@ -298,17 +298,6 @@ def validate?
!options[:validate].nil? ? options[:validate] : (options[:autosave] == true || macro == :has_many)
end
- def dependent_conditions(record, base_class, extra_conditions)
- dependent_conditions = []
- dependent_conditions << "#{primary_key_name} = #{record.send(name).send(:owner_quoted_id)}"
- dependent_conditions << "#{options[:as]}_type = '#{base_class.name}'" if options[:as]
- dependent_conditions << klass.send(:sanitize_sql, options[:conditions]) if options[:conditions]
- dependent_conditions << extra_conditions if extra_conditions
- dependent_conditions = dependent_conditions.collect {|where| "(#{where})" }.join(" AND ")
- dependent_conditions = dependent_conditions.gsub('@', '\@')
- dependent_conditions
- end
-
# Returns +true+ if +self+ is a +belongs_to+ reflection.
def belongs_to?
macro == :belongs_to

0 comments on commit b0bb911

Please sign in to comment.
Something went wrong with that request. Please try again.