rails
rails copied to clipboard
Add a build persistence method
Summary
Provides a wrapper for new
, to provide feature parity with create
s
ability to create multiple records from an array of hashes, using the
same notation as the build
method on associations.
- Associations can create multiple objects from an array of hashes
- Associations can build multiple objects from an array of hashes
- Classes can create multiple objects from an array of hashes
- Classes can build multiple objects from an array of hashes (<- You are here)
As discussed here: https://discuss.rubyonrails.org/t/allow-activerecord-inheritance-new-to-accept-an-array/80889