diff options
author | Matthew McEachen <matthew+github@mceachen.org> | 2011-05-22 16:08:47 -0700 |
---|---|---|
committer | Matthew McEachen <matthew+github@mceachen.org> | 2011-05-22 16:08:47 -0700 |
commit | 378968522164d798bb82505838b83a195aac9cf7 (patch) | |
tree | 51e259812e76d50cd13caea976be5e93c259578b | |
parent | 330fc8c48d91b8909985fd82d7fc3761b1242526 (diff) | |
parent | e4f6e6ad2d00cf2a205a405c18b4c7f284d153fd (diff) | |
download | rails-378968522164d798bb82505838b83a195aac9cf7.tar.gz rails-378968522164d798bb82505838b83a195aac9cf7.tar.bz2 rails-378968522164d798bb82505838b83a195aac9cf7.zip |
Merge branch 'master' of github.com:lifo/docrails
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 8af4971e69..860f7eced2 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -578,8 +578,8 @@ module ActionDispatch # end # # This generates helpers such as +account_projects_path+, just like +resources+ does. - # The difference here being that the routes generated are like /rails/projects/2, - # rather than /accounts/rails/projects/2. + # The difference here being that the routes generated are like /:account_id/projects, + # rather than /accounts/:account_id/projects. # # === Options # diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index d1752a25ff..2116a94980 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1077,7 +1077,8 @@ module ActiveRecord # alongside this object by calling their +destroy+ method. If set to <tt>:delete_all</tt> all associated # objects are deleted *without* calling their +destroy+ method. If set to <tt>:nullify</tt> all associated # objects' foreign keys are set to +NULL+ *without* calling their +save+ callbacks. If set to - # <tt>:restrict</tt> this object cannot be deleted if it has any associated object. + # <tt>:restrict</tt> this object raises an <tt>ActiveRecord::DeleteRestrictionError</tt> exception and + # cannot be deleted if it has any associated objects. # # If using with the <tt>:through</tt> option, the association on the join model must be # a +belongs_to+, and the records which get deleted are the join records, rather than @@ -1226,7 +1227,8 @@ module ActiveRecord # If set to <tt>:destroy</tt>, the associated object is destroyed when this object is. If set to # <tt>:delete</tt>, the associated object is deleted *without* calling its destroy method. # If set to <tt>:nullify</tt>, the associated object's foreign key is set to +NULL+. - # Also, association is assigned. + # Also, association is assigned. If set to <tt>:restrict</tt> this object raises an + # <tt>ActiveRecord::DeleteRestrictionError</tt> exception and cannot be deleted if it has any 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 |