# Link\_to\_remote ignoring :action option

**URL:** <https://www.ruby-forum.com/t/link-to-remote-ignoring-action-option/121781>\
**Category:** Rails\
**Created:** [November 30, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/link-to-remote-ignoring-action-option/121781 "2007-11-30T21:00:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanatos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@thanatos](https://www.ruby-forum.com/u/thanatos)\
**Post date:** [November 30, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/link-to-remote-ignoring-action-option/121781/1 "2007-11-30T21:00:37Z")

</div>

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++

---

<div class="post-metadata">

**Author:** ![thanatos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@thanatos](https://www.ruby-forum.com/u/thanatos)\
**Post date:** [December 1, 2007, 12:33am UTC](https://www.ruby-forum.com/t/link-to-remote-ignoring-action-option/121781/2 "2007-12-01T00:33:14Z")

</div>

On Nov 30, 8:00 pm, thanatos [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![thanatos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@thanatos](https://www.ruby-forum.com/u/thanatos)\
**Post date:** [December 1, 2007, 12:37am UTC](https://www.ruby-forum.com/t/link-to-remote-ignoring-action-option/121781/3 "2007-12-01T00:37:58Z")

</div>

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…
