Link_to_remote ignoring :action option

link_to_remote(item.item_num, {:url => {:action => ‘show’, :params =>
params.merge({:item_num => item.item_num} ) }, :update =>
‘item_show’ } )

The resulting link updates item_show using /items/index/
item_num…whereas it should using /items/show/item_num.

I’ve used link_to_remote a hundred times before this. I can’t figure
out any difference between a previous usage and this new project other
than that the database is a legacy database.

The most frustrating part is that link_to works just fine.

Thanks in advance for any help,
Tony Pitale++

On Nov 30, 8:00 pm, thanatos [email protected] wrote:

link_to_remote(item.item_num, {:url => {:action => ‘show’, :params =>
params.merge({:item_num => item.item_num} ) }, :update =>
‘item_show’ } )

Have you got a few too many { there ?
How about link_to_remote item.item_num, :url => {:action =>
‘show’, :item_num => item.item_num}, :update => ‘item_show’
The *_remote function don’t have that weird thing where you have a
hash of action parameters followed by a second hash of html options.

Fred

thanatos wrote:

link_to_remote(item.item_num, {:url => {:action => ‘show’, :params =>
params.merge({:item_num => item.item_num} ) }, :update =>
‘item_show’ } )

The resulting link updates item_show using /items/index/
item_num…whereas it should using /items/show/item_num.

I’ve used link_to_remote a hundred times before this. I can’t figure
out any difference between a previous usage and this new project other
than that the database is a legacy database.

The most frustrating part is that link_to works just fine.

Thanks in advance for any help,
Tony Pitale++

is there an extra ’ { ’ in there?
what is the error you get? if any…