Fix Rails 4 attribute name and model

On Rails 4 the generated form fields have an incorrect name attribute (particularly with nested models) and don't include the existing value from the model.  This small patch fixes both issues.