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.
Emil K. (Guest)
on 2007-01-15 21: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
Jakob S. (Guest)
on 2007-01-15 23:06
(Received via mailing list)
On Jan 15, 2007, at 20:16 , Emil K. 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 S. - http://mentalized.net
Emil K. (Guest)
on 2007-01-16 00:10
Thank you :)

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