Forum: Ruby on Rails Getting extra information from the url

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.
525e0c75f4f5c1d0ab0b6cc91575b74f?d=identicon&s=25 Emil Kampp (emuen)
on 2007-01-15 20:16
Hi there.

I have a question;

How do i get the information from the url, if it looks like this:

something.com/stuff/show/1?extra=2

Is this wellformatted ? or do i need to change it ? And if i need to
change it, how do i get the extra variable from the url into a variable
in the applikation.

 - Emil
317aad7f9f0b69a440faca74bbe22b20?d=identicon&s=25 Jakob Skjerning (Guest)
on 2007-01-15 22:06
(Received via mailing list)
On Jan 15, 2007, at 20:16 , Emil Kampp wrote:

> something.com/stuff/show/1?extra=2
>
> Is this wellformatted ?

Sure.

> how do i get the extra variable from the url into a variable
> in the applikation.

extra = params[:extra]

--
Jakob Skjerning - http://mentalized.net
525e0c75f4f5c1d0ab0b6cc91575b74f?d=identicon&s=25 Emil Kampp (emuen)
on 2007-01-15 23:10
Thank you :)

Exactly what i needed.
This topic is locked and can not be replied to.