Carl Youngblood
2005-Jul-10 06:55 UTC
Any way to specify different controller in start_form_tag?
I''m trying to place a login form as a part of my layout that will appear at the top right corner of the screen if the user is not logged in. This form needs to specify a controller, since it could be called from a number of different controllers. Is there any easy way to do this? start_form_tag does not seem to accept a :controller setting. Thanks, Carl _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Pat Maddox
2005-Jul-10 07:09 UTC
Re: Any way to specify different controller in start_form_tag?
Yes it does. Check out the ref for start_form_tag/form_tag. Takes the same options as url_for. I would guess that you''re just not specifying them correctly. start_form_tag({ :action => "action", :controller => "controller"}, { options... }) You''ve probably just got start_form_tag(:controller => "controller"), which won''t work. Have to throw it in {} Pat On 7/10/05, Carl Youngblood <carl.youngblood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to place a login form as a part of my layout that will appear at > the top right corner of the screen if the user is not logged in. This form > needs to specify a controller, since it could be called from a number of > different controllers. Is there any easy way to do this? start_form_tag > does not seem to accept a :controller setting. > > Thanks, > > Carl > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >