Permalink
Browse files

adding callbacks should be private

  • Loading branch information...
1 parent 4909337 commit 0d3589ea12d4b564f61659ad47d78bcfbc623a91 @tenderlove tenderlove committed Jun 11, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 activerecord/lib/active_record/associations/builder/belongs_to.rb
@@ -19,6 +19,12 @@ def build
reflection
end
+ def valid_dependent_options
+ [:destroy, :delete]
+ end
+
+ private
+
def add_counter_cache_callbacks(reflection)
cache_column = reflection.counter_cache_column
foreign_key = reflection.foreign_key
@@ -92,9 +98,5 @@ def belongs_to_touch_after_save_or_destroy_for_#{name}
model.after_touch "belongs_to_touch_after_save_or_destroy_for_#{name}"
model.after_destroy "belongs_to_touch_after_save_or_destroy_for_#{name}"
end
-
- def valid_dependent_options
- [:destroy, :delete]
- end
end
end

0 comments on commit 0d3589e

Please sign in to comment.