Changes model naming so the model name for a collection doesn't conflict with its items.
An array could previously get the same model name as its items and that would result in an exception TypeError: no implicit conversion of Hash into Integer because we would attempt to initialize an Array subclass with a Hash of attributes.
This PR changes the logic to add Collection to the array model name, eg. BooksCollection so it doesn't conflict with the item model name, eg. Book.
An array could previously get the same model name as its items and that would result in an exception
TypeError: no implicit conversion of Hash into Integer
because we would attempt to initialize an Array subclass with a Hash of attributes.This PR changes the logic to add
Collection
to the array model name, eg.BooksCollection
so it doesn't conflict with the item model name, eg.Book
.References #52.