[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-05 Thread balaji rajagopal
Hi i use various forms and one controller. view code % form_tag :action = 'wizard', :stage = @next_stage do % controller code: 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

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-05 Thread Peter De Berdt
On 05 Dec 2008, at 09:00, balaji rajagopal wrote: i use various forms and one controller. view code % form_tag :action = 'wizard', :stage = @next_stage do % --- controller code: def wizard if params[:stage].nil? ... elsif params[:stage].to_i == 1 ... elsif

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-05 Thread balaji rajagopal
Hi I follow ur way and i used the above code but i got the bugs can't convert nil into String code - class WizardController ApplicationController def wizard if params[:stage].nil? # @stage = 1

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-04 Thread balaji rajagopal
Hi *Thorsten Müller* I have 5 forms(5 stages) to create my rails application. 1st form: to enter the data and click the next button.To get the values in session. 2nd form: to enter the data and click the next button.To get the values in session. 3rd form: to enter the data and click the next

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-04 Thread balaji rajagopal
*Hi Thorsten Müller * *In my rails application, im using five forms to save the corresponding 5 tables and 1st form using next button to 4th form.final form using create button.To click the create button to save the values in databases.* * please give any idea i can't understand the bugs*

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-04 Thread balaji rajagopal
*Hi Thorsten Müller * *In my rails application, im using five forms to save the corresponding 5 tables and 1st form using next button to 4th form.final form using create button.To click the create button to save the values in databases.* * please give any idea i can't understand the bugs*

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-03 Thread balaji rajagopal
Hi Im using Multiple Forms and Multiple tables +One Model +One Controller in my rails application I have 5 forms(5 stages) to create my rails application. 1st form: to enter the data and click the next button.To get the values in session. 2nd form: to enter the data and click the next button.To

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-03 Thread Thorsten Müller
I do not really understand, what you are doing here, but: You are using else if without a condition several times, beneath the fact that the correct ruby syntax is elsif Then Ruby would interpret the following line: @stage = params[:stage].to_i as condition and the outcome of this is most

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-03 Thread balaji rajagopal
Hi *Thorsten Müller* your guideness very helpful for me. i used the code but i got bugs. code -- class WizardController ApplicationController def wizard if

[Rails] Re: Multiple Forms and Multiple tables +One Model +One Controller

2008-12-03 Thread balaji rajagopal
Hi *Thorsten Müller* i got bugs: NoMethodError in WizardController#wizard You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] Please help me. Thanks and Regards Balaji On 12/4/08, balaji