diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-08-10 23:45:25 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-08-10 23:45:25 +0100 |
commit | a63fc94aa3689f1e781ac51411ec79a81c011d8a (patch) | |
tree | f07f4b44f507ae33f4f968c5026340f43dce5579 /activerecord/lib | |
parent | 6e57d5c5840716b63851f02a6a806ba968065bca (diff) | |
download | rails-a63fc94aa3689f1e781ac51411ec79a81c011d8a.tar.gz rails-a63fc94aa3689f1e781ac51411ec79a81c011d8a.tar.bz2 rails-a63fc94aa3689f1e781ac51411ec79a81c011d8a.zip |
fixup guides in light of :dependent changes
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index d9857b8fbd..9ba3323bc7 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1205,14 +1205,14 @@ module ActiveRecord # from the association name. So <tt>has_one :manager</tt> will by default be linked to the Manager class, but # if the real class name is Person, you'll have to specify it with this option. # [:dependent] - # Controls what happens to the associated objects when - # their owner is destroyed: + # Controls what happens to the associated object when + # its owner is destroyed: # - # * <tt>:destroy</tt> causes all the associated objects to also be destroyed - # * <tt>:delete</tt> causes all the asssociated objects to be deleted directly from the database (so callbacks will not execute) - # * <tt>:nullify</tt> causes the foreign keys to be set to +NULL+. Callbacks are not executed. - # * <tt>:restrict_with_exception</tt> causes an exception to be raised if there are any associated records - # * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there are any associated objects + # * <tt>:destroy</tt> causes the associated object to also be destroyed + # * <tt>:delete</tt> causes the asssociated object to be deleted directly from the database (so callbacks will not execute) + # * <tt>:nullify</tt> causes the foreign key to be set to +NULL+. Callbacks are not executed. + # * <tt>:restrict_with_exception</tt> causes an exception to be raised if there is an associated record + # * <tt>:restrict_with_error</tt> causes an error to be added to the owner if there is an associated object # [:foreign_key] # Specify the foreign key used for the association. By default this is guessed to be the name # of this class in lower-case and "_id" suffixed. So a Person class that makes a +has_one+ association |