aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2015-12-07 11:15:26 -0200
committerRafael França <rafaelmfranca@gmail.com>2015-12-07 11:15:26 -0200
commit87b207aa7f62e1c43bc80c6d9de7614efdd296ac (patch)
tree6940cd59f6b61e586565052c73be639f3c50b04d /activerecord
parentbf9facb31cf029f3ec1ef888825d50c9a2c713d6 (diff)
parentbcf89f44e0597b0ef8886d5d82be12c51462793c (diff)
downloadrails-87b207aa7f62e1c43bc80c6d9de7614efdd296ac.tar.gz
rails-87b207aa7f62e1c43bc80c6d9de7614efdd296ac.tar.bz2
rails-87b207aa7f62e1c43bc80c6d9de7614efdd296ac.zip
Merge pull request #22523 from Elektron1c97/master
Typo correction
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/callbacks.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb
index cfd8cbda67..4058affec3 100644
--- a/activerecord/lib/active_record/callbacks.rb
+++ b/activerecord/lib/active_record/callbacks.rb
@@ -208,12 +208,12 @@ module ActiveRecord
#
# Sometimes the code needs that the callbacks execute in a specific order. For example, a +before_destroy+
# callback (+log_children+ in this case) should be executed before the children get destroyed by the
- # <tt>dependent: destroy</tt> option.
+ # <tt>dependent: :destroy</tt> option.
#
# Let's look at the code below:
#
# class Topic < ActiveRecord::Base
- # has_many :children, dependent: destroy
+ # has_many :children, dependent: :destroy
#
# before_destroy :log_children
#
@@ -228,7 +228,7 @@ module ActiveRecord
# You can use the +prepend+ option on the +before_destroy+ callback to avoid this.
#
# class Topic < ActiveRecord::Base
- # has_many :children, dependent: destroy
+ # has_many :children, dependent: :destroy
#
# before_destroy :log_children, prepend: true
#
@@ -238,7 +238,7 @@ module ActiveRecord
# end
# end
#
- # This way, the +before_destroy+ gets executed before the <tt>dependent: destroy</tt> is called, and the data is still available.
+ # This way, the +before_destroy+ gets executed before the <tt>dependent: :destroy</tt> is called, and the data is still available.
#
# == \Transactions
#