Project

General

Profile

« Previous | Next » 

Revision 3625dad6

Added by Ohad Levy almost 12 years ago

  • ID 3625dad63bf870d3e24a7f22e5377e661fc917e2

[API] - minor fixes

- fixed api index action still refering to old restsapi gem
- currently forced apipie to load DSL so we can reuse its DSL in our views

View differences:

app/views/api/v1/home/index.json.rabl
child(:links => "links") do
# gather index methods of resources
index_method_description_apis = Restapi.app.resource_descriptions.map do |name, resource_description|
if (description = Restapi.method_descriptions["#{name}#index"])
index_method_description_apis = Apipie.app.resource_descriptions.map do |name, resource_description|
if (description = Apipie.method_descriptions["#{name}#index"])
description.apis.first
end
end.compact
# add additional actions
%w(home#status).each do |additional_action|
if (description = Restapi.app.method_descriptions[additional_action]) and
if (description = Apipie.app.method_descriptions[additional_action]) and
(api = description.apis.first)
index_method_description_apis << api
end

Also available in: Unified diff