app/controllers/api_controller/normalizer.rb
# 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_virtual(vtype, name, obj, options = {})
      return normalize_virtual_array(vtype, name, obj, options) if obj.kind_of?(Array) || obj.kind_of?(ActiveRecord::Relation)
      return normalize_virtual_hash(vtype, obj, options) if obj.respond_to?(:attributes) || obj.respond_to?(:keys)
      normalize_attr_byname(vtype, name, obj)
    end
def normalize_virtual ( vtype , name , obj , options = { } ) return normalize_virtual_array ( vtype , name , obj , options ) if obj . kind_of? ( Array ) || obj . kind_of? ( ActiveRecord :: Relation ) return normalize_virtual_hash ( vtype , obj , options ) if obj . respond_to? ( :attributes ) || obj . respond_to? ( :keys ) normalize_attr_byname ( vtype , 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 .
vtype
<not_specific>
name
<not_specific>
obj
<not_specific>
options
<not_specific>