From 6576f7354e50afb79881aaf3a6f50f4e81dfab70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= Date: Sat, 14 Feb 2015 03:24:54 +0100 Subject: Require `belongs_to` by default. Deprecate `required` option in favor of `optional` for belongs_to. --- railties/CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'railties/CHANGELOG.md') 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. -- cgit v1.2.3