apotonick/reform — pull request #73 by TylerRick (2014-03-19 05:43:45+00:00)
Title: Should #save also save nested/associated model objects?

https://github.com/apotonick/reform/blob/master/lib/reform/form/active_record.rb#L39

```ruby
def save(*)
super.tap do
model.save unless block_given? # DISCUSS: should we implement nested saving here?
end
end
```

When I tried out https://github.com/gogogarrett/reform_example, I noticed this bug there: when you edit an album and change one of the song titles, those changes are lost — they are not saved!

Since it is so easy to assume that associated model objects are going to be saved, perhaps this method *should* automatically save them... That would be my vote anyway.

I don't know how hard that would be though. I started adding a test for this in `test/active_record_test.rb` but then discovered that the test setup only has one ActiveRecord model available — `Artist`, which doesn't have any has_many association yet...