yyu
2006-Dec-22 20:29 UTC
Action Web Service - have layered AWS functions calling existing controllers
This is set to a layered dispatching mode i want the API function find_all_orders to call an existing function in app/controllers/order_controller.rb allowing this API function to modify the states in the order_controller any ideas? app/controllers/backend_controller.rb class BackendController < ApplicationController web_service_dispatching_mode :layered web_service :order, OrderService.new web_service_scaffold :invoke end app/apis/order_service.rb Ask is a Model I have in my project class OrderApi < ActionWebService::API::Base api_method :find_all_orders, :returns => [[Ask]] end class OrderService < ActionWebService::Base web_service_api OrderApi def find_all_orders asks = Ask.find(:all) pp asks asks end end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---