diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-12-30 20:42:30 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-12-31 20:00:44 +0000 |
commit | b0bb911fa1923d809b6e4fc120cc1adc0b8dc321 (patch) | |
tree | f45c467ca3202d89c9f3dbe17488f930f89e1734 /activerecord | |
parent | 38fbfa6390c449dfc9a3db2975e65bd0fd665b18 (diff) | |
download | rails-b0bb911fa1923d809b6e4fc120cc1adc0b8dc321.tar.gz rails-b0bb911fa1923d809b6e4fc120cc1adc0b8dc321.tar.bz2 rails-b0bb911fa1923d809b6e4fc120cc1adc0b8dc321.zip |
Now we can drop-kick AssociationReflection#dependent_conditions into oblivion.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 0310e7050d..8c68a1bc00 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -298,17 +298,6 @@ module ActiveRecord !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 |