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.
On May 7, 4:23 pm, docpneumo
<dpne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> 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