From 1ea61cb9bc95bf3857012850ffb475836e5d88e8 Mon Sep 17 00:00:00 2001 From: Lauro Caetano Date: Sat, 8 Feb 2014 18:46:32 -0200 Subject: Add test case for autosave HasMany with accepts_nested_attributes. It should not save the parent record when the nested attributes are invalid. Test case to cover #8194. --- activerecord/test/models/molecule.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/models/molecule.rb') diff --git a/activerecord/test/models/molecule.rb b/activerecord/test/models/molecule.rb index 69325b8d29..26870c8f88 100644 --- a/activerecord/test/models/molecule.rb +++ b/activerecord/test/models/molecule.rb @@ -1,4 +1,6 @@ class Molecule < ActiveRecord::Base belongs_to :liquid has_many :electrons + + accepts_nested_attributes_for :electrons end -- cgit v1.2.3