# Getting extra information from the url

**URL:** <https://www.ruby-forum.com/t/getting-extra-information-from-the-url/81857>\
**Category:** Rails\
**Created:** [January 15, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/getting-extra-information-from-the-url/81857 "2007-01-15T20:16:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emuen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emuen](https://www.ruby-forum.com/u/emuen)\
**Post date:** [January 15, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/getting-extra-information-from-the-url/81857/1 "2007-01-15T20:16:01Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![emuen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emuen](https://www.ruby-forum.com/u/emuen)\
**Post date:** [January 15, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/getting-extra-information-from-the-url/81857/2 "2007-01-15T22:06:09Z")

</div>

On Jan 15, 2007, at 20:16 , Emil K. wrote:

> [something.com/stuff/show/1?extra=2](http://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](http://mentalized.net)

---

<div class="post-metadata">

**Author:** ![emuen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/96bed5/32.png) [@emuen](https://www.ruby-forum.com/u/emuen)\
**Post date:** [January 15, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/getting-extra-information-from-the-url/81857/3 "2007-01-15T23:10:49Z")

</div>

Thank you 🙂

Exactly what i needed.
