Hello, I''m having some troubles figuring how a REST two-step creation process for a resource could take place. The resource is also nested. I have Projects that may have Contributions. So here is the routes: map.resources :projects do |projects| projects.resources :contributions, :name_prefix => ''project_'' end Adding contribution is a two-steps (two forms) process: first some data, then something other... something like an wizard, you know. There are no problems, of course, on the first new/create RESTful step... but what have I to do to remain REST, but to proceed to step number two? Something like projects/20/contributions/new;step1 and projects/20/contributions/new;step2? Thank you Claudio Cicali --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hi Claudio, 2007/5/6, Claudio Cicali <rails.ml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > I''m having some troubles figuring how a REST two-step creation process for > a resource could take place. The resource is also nested.... Adding contribution is a two-steps (two forms) process: first some data,> then something other... something like an wizard, you know.How are the two steps supposed to work? Does the first step result in creating the object (in the db) and the second setting the remaining attributes? If yes, then it just maps naturally in a first step which posts the new object and a second step that puts the remaining data (i.e. a create+an update) Otherwise it''s justa matter of splitting the single "new object" form in two and therefore i feel the following is correct: Something like projects/20/contributions/new;step1 and> projects/20/contributions/new;step2?Hope that helps... Luca Mearelli --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ehi Luca, On 07/05/07, Luca Mearelli <lucamea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > hi Claudio, > > 2007/5/6, Claudio Cicali <rails.ml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > I''m having some troubles figuring how a REST two-step creation process > > for > > a resource could take place. The resource is also nested. > > > ... > > Adding contribution is a two-steps (two forms) process: first some data, > > then something other... something like an wizard, you know. > > > How are the two steps supposed to work? > Does the first step result in creating the object (in the db) and the > second setting the remaining attributes? > If yes, then it just maps naturally in a first step which posts the new > object and a second step that puts the remaining data (i.e. a create+an > update) >Yeah right... I''d had figured it out already... a new and an update. That could work :) Thank you! (are you the guy behind thewriter? If so, very nice work!) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
2007/5/7, Claudio Cicali <rails.ml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > That could work :) >good Thank you! (are you the guy behind thewriter? If so, very nice work!)>if you mean thetyper.com yes! :) Luca --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---