{"issue":{"state":"open","created_at":"2011-12-12T15:41:44Z","updated_at":"2011-12-12T18:45:50Z","comments":4,"user":{"gravatar_id":"877677f3c0cc6f8822a57b6732933d31","id":48928,"url":"https://api.github.com/users/Adman65","avatar_url":"https://secure.gravatar.com/avatar/877677f3c0cc6f8822a57b6732933d31?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"Adman65"},"body":"How do you think we should do this?\r\n\r\nI have this class structure, Message, Im < Message, Sms < Message, and Email < Message. How would I serialize all the messages?\r\n\r\nI could loop over them myself, but we should make the library robust enough to support this use case.\r\n\r\nFor implementation, I guess it would be like the polymorphic `has_one`, but going up the class tree until we can find a serializer. Question is, where would it stop? It wouldn't make sense to go _all_ the way up tree. Perhaps define a method on each ActiveModel instance to determine what to use to serialize it.\r\n\r\nWhat do you think? I think this the last problem I'll run into for bit with this library :)","assignee":null,"id":2524250,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"number":13,"title":"Cannot use STI w/has_many","html_url":"https://github.com/josevalim/active_model_serializers/issues/13","closed_at":null,"url":"https://api.github.com/repos/josevalim/active_model_serializers/issues/13","milestone":null},"action":"created","comment":{"created_at":"2011-12-12T18:45:49Z","updated_at":"2011-12-12T18:45:49Z","user":{"gravatar_id":"e837f6b7fd146ab16ed3d663476c063e","id":9582,"url":"https://api.github.com/users/josevalim","avatar_url":"https://secure.gravatar.com/avatar/e837f6b7fd146ab16ed3d663476c063e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"josevalim"},"body":"Yeah, that would be probably fine. /cc @wycats wdyt?","id":3110420,"url":"https://api.github.com/repos/josevalim/active_model_serializers/issues/comments/3110420"}}