use env.subject.constructor instead of @model
Merge pull request #1108 from batmanjs/nested-attributes-fix

use env.subject.constructor instead of @model