diff options
author | Kir Shatrov <shatrov@me.com> | 2017-05-22 17:39:14 +0100 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-05-22 17:39:14 +0100 |
commit | 78ad8098ba46ec59eb0d6e9d1280339e1294e093 (patch) | |
tree | 4fe73a5a93253f36f62292eb202f67366d2ab439 /activerecord/lib/active_record | |
parent | 673dacc937f20227fbdece55b36c63241df5bf83 (diff) | |
download | rails-78ad8098ba46ec59eb0d6e9d1280339e1294e093.tar.gz rails-78ad8098ba46ec59eb0d6e9d1280339e1294e093.tar.bz2 rails-78ad8098ba46ec59eb0d6e9d1280339e1294e093.zip |
More friendly exception in nested attributes
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/nested_attributes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb index 01ecd79b8f..3f39fb84e8 100644 --- a/activerecord/lib/active_record/nested_attributes.rb +++ b/activerecord/lib/active_record/nested_attributes.rb @@ -458,7 +458,7 @@ module ActiveRecord end unless attributes_collection.is_a?(Hash) || attributes_collection.is_a?(Array) - raise ArgumentError, "Hash or Array expected, got #{attributes_collection.class.name} (#{attributes_collection.inspect})" + raise ArgumentError, "Hash or Array expected for attribute `#{association_name}`, got #{attributes_collection.class.name} (#{attributes_collection.inspect})" end check_record_limit!(options[:limit], attributes_collection) |