Hi Michael, das "Wahrscheinlich" kannst du streichen.
Ich denke mal, dass du in einem solchen Fall mit Matches arbeiten musst: http://guides.rubyonrails.org/routing.html#non-resourceful-routes Ahoi Am 28.01.2011 um 10:38 schrieb rubyonrails...@galt.de: > Hallo Thomas, > > vielen Dank für den Hinweis. > > Das Routing mit den Resources macht mir deshalb etwas Kopfzerbrechen, weil in > den Resource Routes keine ID für die Resource vorkommt. > > Die id wird in diesem Falle in der Session gehalten. Der Anwender soll die > Shopping Cart id nicht zu Gesicht bekommen. > > Wahrscheinlich entspricht das nicht der REST-Idee, denn da ist ja jede URL > ein eindeutiger Verweis auf die jeweilige Aktion. > > Viele Grüße > > Michael Kastner > > Am 27.01.2011 um 18:52 schrieb Thomas von Deyen: > >> Ist auch ganz einfach meistens: >> >> mit id => member >> ohne id => collection >> >> ;) >> >> Thomas von Deyen >> >> mobile +49 (0)179 492 3992 >> mail tho...@vondeyen.com >> web thomas.vondeyen.com >> twitter twitter.com/tvdeyen >> >> Save the environment: >> >> Before printing this email, >> please assess if it is really >> needed! >> >> Am 27.01.2011 um 16:32 schrieb rubyonrails...@galt.de: >> >>> Das war aber schnell. >>> >>> Vielen Dank! >>> >>> >>> >>> Am 27.01.2011 um 16:27 schrieb Thomas von Deyen: >>> >>>> dann muss es eine collection sein, kein member >>>> >>>> Thomas von Deyen >>>> >>>> mobile +49 (0)179 492 3992 >>>> mail tho...@vondeyen.com >>>> web thomas.vondeyen.com >>>> twitter twitter.com/tvdeyen >>>> >>>> Save the environment: >>>> >>>> Before printing this email, >>>> please assess if it is really >>>> needed! >>>> >>>> Am 27.01.2011 um 16:25 schrieb rubyonrails...@galt.de: >>>> >>>>> Hi, >>>>> >>>>> ich hänge hier schon wieder fest. Sorry, wenn das nervt. >>>>> >>>>> Ich würde gerne eine bestimmte route definieren: >>>>> >>>>> resources :carts do >>>>> member do >>>>> get "add/:product_id", :action => 'add' >>>>> end >>>>> end >>>>> >>>>> aber die route, die generiert wird sieht so aus: >>>>> >>>>> cart GET /carts/:id/add/:product_id(.:format) >>>>> >>>>> Das ist aber genau das nicht, was ich erreichen möchte, denn die Id des >>>>> Carts wird nicht übergeben. Ich benötige das als Ergebnis: >>>>> >>>>> cart_add GET /carts/add/:product_id(.:format) >>>>> >>>>> Geht das überhaupt oder ist das in den routes garnicht vorgesehen? >>>>> >>>>> >>>>> Viele Grüße >>>>> >>>>> Michael Kastner >>>>> _______________________________________________ >>>>> rubyonrails-ug mailing list >>>>> rubyonrails-ug@headflash.com >>>>> http://mailman.headflash.com/listinfo/rubyonrails-ug >>>> >>>> _______________________________________________ >>>> rubyonrails-ug mailing list >>>> rubyonrails-ug@headflash.com >>>> http://mailman.headflash.com/listinfo/rubyonrails-ug >>> >>> _______________________________________________ >>> rubyonrails-ug mailing list >>> rubyonrails-ug@headflash.com >>> http://mailman.headflash.com/listinfo/rubyonrails-ug >> >> _______________________________________________ >> rubyonrails-ug mailing list >> rubyonrails-ug@headflash.com >> http://mailman.headflash.com/listinfo/rubyonrails-ug > > _______________________________________________ > rubyonrails-ug mailing list > rubyonrails-ug@headflash.com > http://mailman.headflash.com/listinfo/rubyonrails-ug _______________________________________________ rubyonrails-ug mailing list rubyonrails-ug@headflash.com http://mailman.headflash.com/listinfo/rubyonrails-ug