aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-30 20:59:27 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-30 21:02:46 -0300
commit04852b875ec5c2bd5e5f8bf525b7be60682d0c27 (patch)
tree134de2742be036a222ca0db5de68a2494fa47736 /activerecord/CHANGELOG.md
parenta4d5e835608d951cf6c306ccc9aed06896e07c15 (diff)
downloadrails-04852b875ec5c2bd5e5f8bf525b7be60682d0c27.tar.gz
rails-04852b875ec5c2bd5e5f8bf525b7be60682d0c27.tar.bz2
rails-04852b875ec5c2bd5e5f8bf525b7be60682d0c27.zip
Fix error message when trying to create an associated record
This error only happens when the foreign key is missing. Before this fix the following exception was being raised: NoMethodError: undefined method `val' for #<Arel::Nodes::BindParam:0x007fc64d19c218> Now the message is: ActiveRecord::UnknownAttributeError: unknown attribute 'foreign_key' for Model.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index c78ddd5fe6..859ba38588 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,16 @@
+* Fix error message when trying to create an associated record and the foreign
+ key is missing.
+
+ Before this fix the following exception was being raised:
+
+ NoMethodError: undefined method `val' for #<Arel::Nodes::BindParam:0x007fc64d19c218>
+
+ Now the message is:
+
+ ActiveRecord::UnknownAttributeError: unknown attribute 'foreign_key' for Model.
+
+ *Rafael Mendonça França*
+
* When a table has a composite primary key, the `primary_key` method for
SQLite3 and PostgreSQL adapters was only returning the first field of the key.
Ensures that it will return nil instead, as Active Record doesn't support