app/controllers/api_controller/renderer.rb
#
# Let's create the action specs for the different collections
#
# type is :collection or :resource
# subcollection set to true, if accessing collection or resource as subcollection
# href is the optional href for the action specs, required for resources
#
Let's create the action specs for the different collections
type is :collection or :resource
subcollection set to true, if accessing collection or resource as subcollection
href is the optional href for the action specs, required for resources
Let ' s create the action specs for the different collections type is : collection or : resource subcollection set to true if accessing collection or resource as subcollection href is the optional href for the action specs required for resources
def gen_action_specs(collection, type, is_subcollection, href = nil, resource = nil)
      if collection_config.key?(collection)
        cspec = collection_config[collection]
        if type == :collection
          gen_action_spec_for_collections(collection, cspec, is_subcollection, href)
        else
          gen_action_spec_for_resources(cspec, is_subcollection, href, resource)
        end
      end
    end
def gen_action_specs ( collection , type , is_subcollection , href = nil , resource = nil ) if collection_config . key? ( collection ) cspec = collection_config [ collection ] if type == :collection gen_action_spec_for_collections ( collection , cspec , is_subcollection , href ) else gen_action_spec_for_resources ( cspec , is_subcollection , href , resource ) end end end
Let's create the action specs for the different collections
type is :collection or :resource
subcollection set to true, if accessing collection or resource as subcollection
href is the optional href for the action specs, required for resources
Let ' s create the action specs for the different collections type is : collection or : resource subcollection set to true if accessing collection or resource as subcollection href is the optional href for the action specs required for resources
collection
<not_specific>
type
<not_specific>
is_subcollection
<not_specific>
href
<not_specific>
resource
<not_specific>