diff options
-rw-r--r-- | activerecord/lib/active_record/callbacks.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 7c4f1b2bb3..5d4d9379f0 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -54,8 +54,8 @@ module ActiveRecord # # 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 } + # before_destroy { |record| Person.where(firm_id: record.id).destroy_all } + # before_destroy { |record| Client.where(client_of: record.id).destroy_all } # end # # == Inheritable callback queues |