There are probably a few ways to do this, but it sounds like your
trying to use one master-form to handle a number of different
things.>From a testing/maintainability point of view, I prefer more
fine-grained HTML->controller interactions. If you really want the
user to be directed to different controllers, then I''d definately
recommend having a one form->one controller mapping, otherwise testing
becomes more complicated.
sam
On 5/10/05, Gavin Sinclair
<gsinclair-81uBx+iSpXA0n/F98K4Iww@public.gmane.org>
wrote:> On Tuesday, May 10, 2005, 8:22:09 AM, ianic wrote:
>
> > Is there a way in rails to choose controller action to which form will
> > be submitted?
>
> > Currently I have something like this:
>
> > VIEW:
> > <%= start_form_tag(:action =>
''action_chooser'', :id => @id %>
>
> Untested, but should work:
>
> <%= start_form_tag(:controller => ''whatever'',
:action => ''action_chooser'', :id => @id %>
>
> Gavin
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
sam
http://www.magpiebrain.com/