This has to be so easy (and probably obvious) that I''m going to be
embarrassed when I see the answer.
I have a front end form that - depending on what the user selects and
enters - will cause different actions to take place. There is no
ActiveRecord associated with the front end, so I don''t have an object
to
instantiate for the form to work with.
Do I need to create a dummy class to for the form, or is there a simpler
way to get to data off of it. Ideally, I''d like to do a
if request.post?
if @inputDat.xxx == ....
end
type of check and redirect to the action that handles what the user is
wanting to do.
Thanks in advance
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
all the forms Post data will be in the params[] hash. forms are never bind to a specific model, the params[] hash always contains the POST data of a submitted form so if you have a <input type="text" name="search" value=""> you can access this fields content with params[:search] etc. etc. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thorsten L wrote:> all the forms Post data will be in the params[] hash. > > forms are never bind to a specific model, the params[] hash always > contains the POST data of a submitted form > > so if you have a <input type="text" name="search" value=""> > > you can access this fields content with params[:search] > > etc. etc.I knew it was going to be obvious, but I didn''t think my (usual) case of tunnel vision was that bad. Thanks much ---Michael -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---