diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-06-11 11:34:53 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-06-11 11:34:53 -0700 |
commit | 0d3589ea12d4b564f61659ad47d78bcfbc623a91 (patch) | |
tree | 0ae729312e0961a6a4284a49a233ea93221242ba /activerecord | |
parent | 4909337a1fece552e653b8a3d801db9859b783f1 (diff) | |
download | rails-0d3589ea12d4b564f61659ad47d78bcfbc623a91.tar.gz rails-0d3589ea12d4b564f61659ad47d78bcfbc623a91.tar.bz2 rails-0d3589ea12d4b564f61659ad47d78bcfbc623a91.zip |
adding callbacks should be private
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/belongs_to.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/builder/belongs_to.rb b/activerecord/lib/active_record/associations/builder/belongs_to.rb index 63e9526436..f2b6a8dfb5 100644 --- a/activerecord/lib/active_record/associations/builder/belongs_to.rb +++ b/activerecord/lib/active_record/associations/builder/belongs_to.rb @@ -19,6 +19,12 @@ module ActiveRecord::Associations::Builder 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 @@ module ActiveRecord::Associations::Builder 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 |