1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/molecule.rb
Lauro Caetano 1ea61cb9bc 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.
2014-02-08 18:57:26 -02:00

6 lines
127 B
Ruby

class Molecule < ActiveRecord::Base
belongs_to :liquid
has_many :electrons
accepts_nested_attributes_for :electrons
end