aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-23 11:18:54 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-02-23 11:18:54 -0300
commit069c03b2d1909b331dd8aaa3e07aaea989a2d6e6 (patch)
tree91ddc9e70524eeb8591af1903a4ff486ec645f38 /activerecord/CHANGELOG.md
parent49389104456526e35d9d65d787cd904fa5a55d85 (diff)
parent6576f7354e50afb79881aaf3a6f50f4e81dfab70 (diff)
downloadrails-069c03b2d1909b331dd8aaa3e07aaea989a2d6e6.tar.gz
rails-069c03b2d1909b331dd8aaa3e07aaea989a2d6e6.tar.bz2
rails-069c03b2d1909b331dd8aaa3e07aaea989a2d6e6.zip
Merge pull request #18937 from simi/optional-belongs-to
Require `belongs_to` by default.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 52aaa2371d..b636ffdc97 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,10 @@
+* `belongs_to` will now trigger a validation error by default if the association is not present.
+ You can turn this off on a per-association basis with `optional: true`.
+ (Note this new default only applies to new Rails apps that will be generated with
+ `config.active_record.belongs_to_required_by_default = true` in initializer.)
+
+ *Josef Šimánek*
+
* Fixed ActiveRecord::Relation#becomes! and changed_attributes issues for type column
Fixes #17139.