Displaying 1 result from an estimated 1 matches for "find_car_by_name".
2006 Nov 04
1
layere dispatching - please help!
...r) {CarService.new}
end
and my service (node_service.rb) as:
class CarApi < ActionWebService::API::Base
api_method :find_all_cars,
:returns => [[:int]]
api_method :find_car_by_id,
:expects => [:int],
:returns => [Car]
api_method :find_car_by_name,
:expects => [:string],
:returns => [[Car]]
end
class CarService < ActionWebService::Base
web_service_api CarApi
def find_all_cars
Car.find(:all).map{ |car| car.id }
end
def find_car_by_id(id)
Car.find(id)
end...