Hi Im using one controller+ 5 forms(5 stages). and i used the code but ony two form data stored in databases.give any suggestion def wizard if params[:stage].nil? ... elsif params[:stage].to_i == 1 ... elsif params[:stage].to_i == 2 ... elsif params[:stage].to_i == 3 ...... elsif params[:stage].to_i == 4 ........ else ... end @next_stage = @stage+1 render :template => ''wizard\\stage''+@next_stage.to_s end please help me Thanks balaji --~--~---------~--~----~------------~-------~--~----~ 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. I also worked on a wizard but instead of having ''meaningless'' name like "stage" I gave each form a ''real'' name, like ''contact'' for contact information, ''demographics'' for demographic information and so on. This allowed me to have clearly defined actions in my controller (contact, demographics, and so on) as of what needed to happen when and the correct page was always displayed. I''m not sure if this is the best way of going but it worked best for me. Pepe On Dec 5, 1:04 am, "balaji rajagopal" <balajiece.rajago...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > Im using one controller+ 5 forms(5 stages). and i used the code but ony two > form data stored in databases.give any suggestion > > def wizard > if params[:stage].nil? > > ... > elsif params[:stage].to_i == 1 > ... > elsif params[:stage].to_i == 2 > ... > elsif params[:stage].to_i == 3 > ...... > elsif params[:stage].to_i == 4 > > ........ > else > ... > end > > @next_stage = @stage+1 > > render :template => ''wizard\\stage''+@next_stage.to_s > end > > please help me > > Thanks > balaji--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi i worked the same method and i got the value.... Thanks balaji On 12/6/08, pepe <Pepe-gUAqH5+0sKL6V6G2DxALlg@public.gmane.org> wrote:> > > Hi. > > I also worked on a wizard but instead of having ''meaningless'' name > like "stage" I gave each form a ''real'' name, like ''contact'' for > contact information, ''demographics'' for demographic information and so > on. This allowed me to have clearly defined actions in my controller > (contact, demographics, and so on) as of what needed to happen when > and the correct page was always displayed. > > I''m not sure if this is the best way of going but it worked best for > me. > > Pepe > > On Dec 5, 1:04 am, "balaji rajagopal" <balajiece.rajago...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > Hi > > > > Im using one controller+ 5 forms(5 stages). and i used the code but ony > two > > form data stored in databases.give any suggestion > > > > def wizard > > if params[:stage].nil? > > > > ... > > elsif params[:stage].to_i == 1 > > ... > > elsif params[:stage].to_i == 2 > > ... > > elsif params[:stage].to_i == 3 > > ...... > > elsif params[:stage].to_i == 4 > > > > ........ > > else > > ... > > end > > > > @next_stage = @stage+1 > > > > render :template => ''wizard\\stage''+@next_stage.to_s > > end > > > > please help me > > > > Thanks > > balaji > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---