rails/activeform — pull request #18 by kaspth (2014-11-18 19:58:38+00:00)
Title: Rethink Active Form's structure

Hi @m-Peter!

Like I said I've been taking a look at Active Form and I'd love to help out :smile:

All but the last commit are just refactorings trying to improve the readability. I was trying to understand the relationship between parts to better know what was going on.

The final commit tries to rethink what Active Form is and how it does things. It's definitely not done and all the tests don't pass.

The main realization came when I figured out that the `main_model` was just another association. This means we can move a lot of logic to just that class and reason about it a lot better.
By also reflecting the hierarchy of a Rails params hash more explicitly in the code, we gain simpler code that is just delegation most of the time (see `attributes=` on the collection and model association classes).

All of these are just suggestions and a different opinion :smile:
What do you think?