# Receiver for \*\_path or \*\_url

**URL:** <https://www.ruby-forum.com/t/receiver-for-path-or-url/167462>\
**Category:** Rails\
**Created:** [May 7, 2009, 11:29pm UTC](https://www.ruby-forum.com/t/receiver-for-path-or-url/167462 "2009-05-07T23:29:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 7, 2009, 11:29pm UTC](https://www.ruby-forum.com/t/receiver-for-path-or-url/167462/1 "2009-05-07T23:29:00Z")

</div>

I’m trying to find out the receiver for \*\_path messages as in:  
link\_to ‘Show’, product\_path(@product)

This came up when I moved the creation of view fragments into objects  
(RColumn) intended to encapsulate the view behaviors of the various  
fields in a record as part of an exploration of dynamic scaffolding  
(e.g. streamlined). Those objects do not have a product\_path() method,  
of course. I thought at first that the controller using the RColumns  
within a view would be the receiver, but that appears to not be true.  
I suspect the receiver is a routing mapper object but do not know how  
to make that object available for use in my RColumn.

BTW. The alternate form:  
link\_to ‘Show’, { :controller =\> ‘products’, :action  
=\> ‘show’, :id =\> @product.id }  
works in the RColumn context.

Any suggestions?

Doc Pneumo

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 8, 2009, 12:19am UTC](https://www.ruby-forum.com/t/receiver-for-path-or-url/167462/2 "2009-05-08T00:19:56Z")

</div>

Perhaps to clarify: I realize that what ever happens to be self  
whenever the method is encountered is sent the message in the examples  
I posted. I’m looking for the intended receiver so that I can use  
something like:

```
  link_to 'Show', recvr.product_path(@product)

```

in my RColumn instances.
