Build model from association with conditions

Hi Guys,

I've developed a patch for this issue:
https://rails.lighthouseapp.com/projects/8994/tickets/5562-build-model-from-association-with-conditions

Any help for reviewing it would be appreciated :wink:

Thanks!