apotonick/reform — pull request #63 by GCorbel (2014-02-01 20:47:25+00:00)
Title: allow to save a activerecord form with composition

I had a bug because of [this line](https://github.com/GCorbel/reform/blob/c643572c98f2cd517de40ad899154622b9556955/lib/reform/form/active_record.rb#L39)

In case of composed form it wasn't work because the object does not have a `save` method. I also moved the things related to the composed form in the new module.

I tried to include the `Reform::Form::ActiveRecord` module in `Reform::ActiveRecordComposed` module without success. I placed it in the `self.included` method but It doesn't work because, when I try to save, I call the save method of `Reform::Form::ActiveRecord`.

I found the code a little bit complicated. Why to instanciate instance variables in [this class](https://github.com/GCorbel/reform/blob/c643572c98f2cd517de40ad899154622b9556955/lib/reform/composition.rb) instead to do a hash that could be used like this `form.models[:first_model]; form.model[:second_model]`?