Class: RailsServicesController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/rails-services.rb

Instance Method Summary collapse

Instance Method Details

#info_resourceObject

Rails 2 routes map.connect ‘info.:format’, :controller => “rails_services”, :action => “info_services” map.connect ‘info/:resource.:format’, :controller => “rails_services”, :action => “info_resource”



11
12
13
14
15
16
# File 'lib/rails-services.rb', line 11

def info_resource
  respond_to do |format|
    #format.xml  { render :xml => xml??? }
    format.json { render :json => describe_resource(params[:resource]) }
  end
end

#info_servicesObject



18
19
20
21
22
23
# File 'lib/rails-services.rb', line 18

def info_services
  respond_to do |format|
    #format.xml  { render :xml => xml??? }
    format.json { render :json => describe_services }
  end
end