Dear all,
I''m a newbie at RubyOnRails. I''ve been struggling in
retrieving the
value of the checked radio button on my form.
Here is the code in my index.rhtml:
<% form_tag :action => ''routesearchtype'' do %>
    <%= radio_button_tag("searchtype", "airfare", checked
= true) %>
Airfare
    <br>
    <br>
    <%= radio_button_tag("searchtype", "hotel", checked =
false) %>
Hotel
    <br>
    <br>
    <%= submit_tag "Next" %>
<% end %>
Here is the code in my controller:
  def index
  end
  def routesearchtype
    if request.post?
      searchtype = params[:searchtype]
      if searchtype == ''aifare''
        redirect_to({ :action => "locationinput"})
      else
        redirect_to({ :action => "notimplemented"})
      end
    end
  end
  def locationinput
  end
  def notimplemented
  end
----------
It seems to come back empty. I''m always redirected to the
"notimplemented" site.
Please be very specific in what/how I need to fix this as I''m pretty
new to all this.
Thank you,
Nick,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---