# To\_parm and how it can be used in a helper

**URL:** <https://www.ruby-forum.com/t/to-parm-and-how-it-can-be-used-in-a-helper/181043>\
**Category:** Rails\
**Created:** [January 4, 2010, 12:20pm UTC](https://www.ruby-forum.com/t/to-parm-and-how-it-can-be-used-in-a-helper/181043 "2010-01-04T12:20:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qaswm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/5f8ce5/32.png) [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Post date:** [January 4, 2010, 12:20pm UTC](https://www.ruby-forum.com/t/to-parm-and-how-it-can-be-used-in-a-helper/181043/1 "2010-01-04T12:20:39Z")

</div>

is there a way to pass the data returned by the to\_parm function in a  
helper?

i followed the info provided at  
[Best Online Casino in Australia | Top Licensed Casinos for Gamblers](http://www.jroller.com/obie/entry/seo_optimization_of_urls_in) and am  
able to successfully get the correct urls, now i want to be able to get  
the same (id-whatever) text and pass it to a helper function for further  
processing.

Any ideas as to how this can be achieved?

---

<div class="post-metadata">

**Author:** ![qaswm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/5f8ce5/32.png) [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Post date:** [January 5, 2010, 7:40pm UTC](https://www.ruby-forum.com/t/to-parm-and-how-it-can-be-used-in-a-helper/181043/2 "2010-01-05T19:40:43Z")

</div>

It can be accomplished by calling the to\_param (not to\_parm) method on  
the object in question. For instance, @city.to\_param, where @city is a  
City object.

---

<div class="post-metadata">

**Author:** ![qaswm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/5f8ce5/32.png) [@qaswm](https://www.ruby-forum.com/u/qaswm)\
**Post date:** [January 5, 2010, 7:55pm UTC](https://www.ruby-forum.com/t/to-parm-and-how-it-can-be-used-in-a-helper/181043/3 "2010-01-05T19:55:34Z")

</div>

Rein H. wrote:

> It can be accomplished by calling the to\_param (not to\_parm) method on  
> the object in question. For instance, @city.to\_param, where @city is a  
> City object.

Thanks for the information. That solved one of my problems. 🙂
