diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-05-05 15:32:52 -0500 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2016-05-05 15:32:52 -0500 |
commit | ed94ed3e1f1f82c6daa7a9f198f3a9983f964707 (patch) | |
tree | 0637570cade4819453095420a9d5349f95525750 /activerecord | |
parent | dd7bdd0e90ebbf26821ea02d25cc424d6eb370b2 (diff) | |
parent | c91f4cc0f6461a05b9fed80b0519903930785767 (diff) | |
download | rails-ed94ed3e1f1f82c6daa7a9f198f3a9983f964707.tar.gz rails-ed94ed3e1f1f82c6daa7a9f198f3a9983f964707.tar.bz2 rails-ed94ed3e1f1f82c6daa7a9f198f3a9983f964707.zip |
Merge pull request #24869 from vipulnsward/change-example
Change to use a more realistic example [ci skip]
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/callbacks.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 5d4d9379f0..95de6937af 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -53,9 +53,9 @@ module ActiveRecord # end # # class Firm < ActiveRecord::Base - # # Destroys the associated clients and people when the firm is destroyed - # before_destroy { |record| Person.where(firm_id: record.id).destroy_all } - # before_destroy { |record| Client.where(client_of: record.id).destroy_all } + # # Disables access to the system, for associated clients and people when the firm is destroyed + # before_destroy { |record| Person.where(firm_id: record.id).update_all(access: 'disabled') } + # before_destroy { |record| Client.where(client_of: record.id).update_all(access: 'disabled') } # end # # == Inheritable callback queues |