# How the url parameters are mapped to params hash?

**URL:** <https://www.ruby-forum.com/t/how-the-url-parameters-are-mapped-to-params-hash/149583>\
**Category:** Rails\
**Created:** [September 26, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/how-the-url-parameters-are-mapped-to-params-hash/149583 "2008-09-26T15:15:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [September 26, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/how-the-url-parameters-are-mapped-to-params-hash/149583/1 "2008-09-26T15:15:28Z")

</div>

Hi,  
I have created the url  
“[http://localhost:3000/groups/home?group\_id=1&parent\_id=3](http://localhost:3000/groups/home?group_id=1&parent_id=3)”.  
I have one method in which I am able to access the url parameters by  
using params[:group\_id] and params[:parent\_id].  
My question is that how the params hash is get created? and who creats  
this hash?

Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [September 26, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/how-the-url-parameters-are-mapped-to-params-hash/149583/2 "2008-09-26T15:49:56Z")

</div>

On 26 Sep 2008, at 14:15, Tushar G. wrote:

> Hi,  
> I have created the url  
> “[http://localhost:3000/groups/home?group\_id=1&parent\_id=3](http://localhost:3000/groups/home?group_id=1&parent_id=3)”.  
> I have one method in which I am able to access the url parameters by  
> using params[:group\_id] and params[:parent\_id].  
> My question is that how the params hash is get created? and who creats  
> this hash?

ActionController creates it for you (grungy details in request.rb)

Fred
