app/controllers/api_controller/normalizer.rb
def normalize_direct(type, name, obj)
      return normalize_direct_array(type, name, obj) if obj.kind_of?(Array) || obj.kind_of?(ActiveRecord::Relation)
      return normalize_hash(type, obj) if obj.respond_to?(:attributes) || obj.respond_to?(:keys)
      normalize_attr_byname(type, name, obj)
    end
# Note: revisit merging direct and virtual normalize hash methods here once support for
# virtual subcollections is added.
revisit merging direct and virtual normalize hash methods here once support for
virtual subcollections is added.
revisit merging direct and virtual normalize hash methods here once support for virtual subcollections is added .
def normalize_direct(type, name, obj)
      return normalize_direct_array(type, name, obj) if obj.kind_of?(Array) || obj.kind_of?(ActiveRecord::Relation)
      return normalize_hash(type, obj) if obj.respond_to?(:attributes) || obj.respond_to?(:keys)
      normalize_attr_byname(type, name, obj)
    end
def normalize_direct ( type , name , obj ) return normalize_direct_array ( type , name , obj ) if obj . kind_of? ( Array ) || obj . kind_of? ( ActiveRecord :: Relation ) return normalize_hash ( type , obj ) if obj . respond_to? ( :attributes ) || obj . respond_to? ( :keys ) normalize_attr_byname ( type , name , obj ) end
Note: revisit merging direct and virtual normalize hash methods here once support for
virtual subcollections is added.
Note : revisit merging direct and virtual normalize hash methods here once support for virtual subcollections is added .
type
name
obj