# Hash\_for\_\*\_url documentation

**URL:** <https://www.ruby-forum.com/t/hash-for-url-documentation/189198>\
**Category:** Rails\
**Created:** [May 26, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/hash-for-url-documentation/189198 "2010-05-26T15:53:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [May 26, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/hash-for-url-documentation/189198/1 "2010-05-26T15:53:00Z")

</div>

Is there any documentation for hash\_for\_\*\_url arguments?

What does this function do?

---

<div class="post-metadata">

**Author:** ![ralphshnelvar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e19adc/32.png) [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Post date:** [May 26, 2010, 6:35pm UTC](https://www.ruby-forum.com/t/hash-for-url-documentation/189198/2 "2010-05-26T18:35:18Z")

</div>

On May 26, 2010, at 6:53 AM, Ralph S. wrote:

> Is there any documentation for hash\_for\_\*\_url arguments?
> 
> What does this function do?

It returns a hash that makes up the pieces of the url necessary for  
url\_for and the one expires\_page that wants a hash.

The arguments are whatever you’d pass to “url\_for”… that is…

\<%=h news\_post\_path(:id =\> 1).inspect %\>  
\<%=h hash\_for\_news\_post\_path(:id =\> 1).inspect %\>

“/news/1”  
{:category=\>“News”, :use\_route=\>:news\_post, :only\_path=\>true,  
:controller=\>“articles”, :action=\>“post”, :id=\>1}
