voltrb / volt

A Ruby web framework where your Ruby runs on both server and client
MIT License
3.22k stars 196 forks source link

subclasses of custom Model do not inherit custom ArrayModel #286

Closed alexandred closed 9 years ago

alexandred commented 9 years ago

This is easiest to demonstrate with the following example:

class StorageBase < Volt::Model
end

class StorageBases < Volt::ArrayModel
end

class Attachment < StorageBase
end

In this case, store.storage_bases is an instance of StorageBases but store.attachments is an instance of Volt::ArrayModel. The expected behaviour would be that store.attachments is an instance of StorageBases.

ryanstout commented 9 years ago

PR merged. Thanks