aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorlholden <lholden@yellowpages.com>2009-01-21 16:17:24 -0800
committerlholden <lholden@yellowpages.com>2009-01-21 16:17:24 -0800
commit19f8bb2808316dfca1f009538c3505ba144f614b (patch)
tree1ab9e925e83b988ed2a1858aa19236e2bcd79a60 /activerecord/lib/active_record/associations.rb
parentb8fadd708b9850a77e1f64038763fffcff502499 (diff)
parent73cc5f270a5c2a2eab76c6c02615fec608822494 (diff)
downloadrails-19f8bb2808316dfca1f009538c3505ba144f614b.tar.gz
rails-19f8bb2808316dfca1f009538c3505ba144f614b.tar.bz2
rails-19f8bb2808316dfca1f009538c3505ba144f614b.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index 86616abf52..8b51a38f48 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1531,14 +1531,14 @@ module ActiveRecord
association = send(reflection.name)
association.destroy unless association.nil?
end
- before_destroy method_name
+ after_destroy method_name
when :delete
method_name = "belongs_to_dependent_delete_for_#{reflection.name}".to_sym
define_method(method_name) do
association = send(reflection.name)
association.delete unless association.nil?
end
- before_destroy method_name
+ after_destroy method_name
else
raise ArgumentError, "The :dependent option expects either :destroy or :delete (#{reflection.options[:dependent].inspect})"
end