aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG.md
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2015-02-14 03:24:54 +0100
committerJosef Šimánek <josef.simanek@gmail.com>2015-02-21 23:03:10 +0100
commit6576f7354e50afb79881aaf3a6f50f4e81dfab70 (patch)
tree9f53674c07731b069c0890fb26ab3d64b4207e8b /railties/CHANGELOG.md
parentbab3c7c63deee86305d80e24c4ea1124c0ec27d1 (diff)
downloadrails-6576f7354e50afb79881aaf3a6f50f4e81dfab70.tar.gz
rails-6576f7354e50afb79881aaf3a6f50f4e81dfab70.tar.bz2
rails-6576f7354e50afb79881aaf3a6f50f4e81dfab70.zip
Require `belongs_to` by default.
Deprecate `required` option in favor of `optional` for belongs_to.
Diffstat (limited to 'railties/CHANGELOG.md')
-rw-r--r--railties/CHANGELOG.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 74d1ca3bd8..df9f8fe993 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,18 @@
+* Add `config/initializers/active_record_belongs_to_required_by_default.rb`
+
+ Newly generated Rails apps have a new initializer called
+ `active_record_belongs_to_required_by_default.rb` which sets the value of
+ the configuration option `config.active_record.belongs_to_requred_by_default`
+ to `true` when ActiveRecord is not skipped.
+
+ As a result, new Rails apps require `belongs_to` association on model
+ to be valid.
+
+ This initializer is *not* added when running `rake rails:update`, so
+ old apps ported to Rails 5 will work without any change.
+
+ *Josef Šimánek*
+
* `delete` operations in configurations are run last in order to eliminate
'No such middleware' errors when `insert_before` or `insert_after` are added
after the `delete` operation for the middleware being deleted.