Forum: Ruby on Rails various forms and one controller

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
17da318855d695d08408ded419132012?d=identicon&s=25 Balaji Rajagopalan (balajirajagopalan)
on 2008-12-05 09:59
(Received via mailing list)
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 params[:stage].to_i == 4
..............
else
...
end
render :template => 'wizard\\stage'+@next_stage.to_s
end

but i got error and first form values only saved in databases

so please help me
Thanks
balaji
This topic is locked and can not be replied to.