class ActiveModel::Serializer
def serializer_for(resource)
def serializer_for(resource) if resource.respond_to?(:to_ary) ArraySerializer else begin Object.const_get "#{resource.class.name}Serializer" rescue NameError nil end end end
def serializer_for(resource) if resource.respond_to?(:to_ary) ArraySerializer else begin Object.const_get "#{resource.class.name}Serializer" rescue NameError nil end end end