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