ActiveRecord::Persistence#create allows you to pass in an array, and it will create objects from that array (using new) and return them.
However, ActiveRecord::Inheritance#new does not allow you to do this. Being similar in scope to create, my expectation is that I should be able to pass in an array of attributes, and get a list of unpersisted objects as a result.
build only works with associations, so it doesn’t quite meet that need.
I don’t disagree that it’s counterintuitive, but I would argue that the same thing can be said about the create method. create is essentially just a wrapper for Object.new.save, so it’s odd to me that it has functionality that new doesn’t share. I expected the two to roughly have feature parity, since they are so closely related.
It doesn’t quite solve the mismatch in functionality between new and create, which is pretty confusing IMO. But, it is a great solution to the immediate “how do I generate multiple unpersisted objects from a hash” problem. I’ll work on a PR for this.