Skip to content

Commit

Permalink
Updated Changelog to reflect removal of :dependent => :restrict
Browse files Browse the repository at this point in the history
Based on rails#2502, the option has
been removed.
  • Loading branch information
rystraum committed Jan 13, 2014
1 parent 050f100 commit 25a9623
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions guides/source/upgrading_ruby_on_rails.md
Expand Up @@ -614,6 +614,10 @@ config.active_record.mass_assignment_sanitizer = :strict


Rails 3.2 deprecates `vendor/plugins` and Rails 4.0 will remove them completely. While it's not strictly necessary as part of a Rails 3.2 upgrade, you can start replacing any plugins by extracting them to gems and adding them to your Gemfile. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`. Rails 3.2 deprecates `vendor/plugins` and Rails 4.0 will remove them completely. While it's not strictly necessary as part of a Rails 3.2 upgrade, you can start replacing any plugins by extracting them to gems and adding them to your Gemfile. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`.


### Active Record

Option `:dependent => :restrict` has been removed from `belongs_to`. If you want to prevent deleting the object if there are any associated objects, you can set `:dependent => :destroy` and return `false` after checking for existence of association from any of the associated object's destroy callbacks.

Upgrading from Rails 3.0 to Rails 3.1 Upgrading from Rails 3.0 to Rails 3.1
------------------------------------- -------------------------------------


Expand Down

0 comments on commit 25a9623

Please sign in to comment.