Forum: Ruby on Rails Using 'GET'-method in Forms

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.
E8a360dd29cc74a16393eb515d34a181?d=identicon&s=25 Timo Pick (Guest)
on 2006-01-25 16:44
(Received via mailing list)
Hi all,

I'm using a selection-list / dropdown-list to choose an element in a
number
of grouped elements. Is there a way of passing an element_id to the form
AND
using the HTTP-'get'-method? I found that the <% start_tag %> has a
:method-switch as an option, but it passes the arguments on like
"/controller/action/?action=1". I would need something like
"/controller/action/1"

Can you help?
337cdd270761e0e6f4356de45b04d388?d=identicon&s=25 Jonathan Viney (jonny)
on 2006-01-25 20:49
My guess is you'll have trouble getting a form to submit with a url like
that. Forms submit there data as key/value pairs usually.

But, something like /controller/action/?id=1 isn't really a problem, you
can still access params[:id].

I'm not sure that really answers your question ... can you make it a bit
clearer?

-Jonny.

Timo Pick wrote:
> Hi all,
>
> I'm using a selection-list / dropdown-list to choose an element in a
> number
> of grouped elements. Is there a way of passing an element_id to the form
> AND
> using the HTTP-'get'-method? I found that the <% start_tag %> has a
> :method-switch as an option, but it passes the arguments on like
> "/controller/action/?action=1". I would need something like
> "/controller/action/1"
>
> Can you help?
E8a360dd29cc74a16393eb515d34a181?d=identicon&s=25 Timo Pick (Guest)
on 2006-01-25 23:39
(Received via mailing list)
You solved it. I became just too used to the pretty-url thing, that i
ignored the fact that its already working as a conventional url.
thanks.
This topic is locked and can not be replied to.