# How to add hint to link\_to\_remote?

**URL:** <https://www.ruby-forum.com/t/how-to-add-hint-to-link-to-remote/60882>\
**Category:** Rails\
**Created:** [May 18, 2006, 6:11am UTC](https://www.ruby-forum.com/t/how-to-add-hint-to-link-to-remote/60882 "2006-05-18T06:11:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cookoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c89c15/32.png) [@cookoo](https://www.ruby-forum.com/u/cookoo)\
**Post date:** [May 18, 2006, 6:11am UTC](https://www.ruby-forum.com/t/how-to-add-hint-to-link-to-remote/60882/1 "2006-05-18T06:11:47Z")

</div>

To add a hint to normal link is very easy:  
link\_to ‘design’, {:action =\> ‘design’, :id =\> survey}, :title =\>  
‘Design the survey’

but, after trying several times, I still can’t figure out how to do the  
same to link\_to\_remote. I’ve tried put :html =\> {:title =\> ‘blah’}. It  
doesn’t work.

Anyone has a solution? Thanks.

---

<div class="post-metadata">

**Author:** ![cookoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c89c15/32.png) [@cookoo](https://www.ruby-forum.com/u/cookoo)\
**Post date:** [May 18, 2006, 6:29am UTC](https://www.ruby-forum.com/t/how-to-add-hint-to-link-to-remote/60882/2 "2006-05-18T06:29:45Z")

</div>

try using the format soecified in the API:  
link\_to\_remote(name, options = {}, html\_options = {})

so all your none-html options need to sit in a hash, and then all your  
html options need to sit in another hash immediately afterwards. from  
your previous example, something like this:

link\_to ‘design’, {:action =\> ‘design’, :id =\> survey}, {:title =\>  
‘Design the survey’}

HTH (and works…)

dorian

---

<div class="post-metadata">

**Author:** ![cookoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c89c15/32.png) [@cookoo](https://www.ruby-forum.com/u/cookoo)\
**Post date:** [May 18, 2006, 7:05am UTC](https://www.ruby-forum.com/t/how-to-add-hint-to-link-to-remote/60882/3 "2006-05-18T07:05:31Z")

</div>

dorian mcfarland wrote:

> try using the format soecified in the API:  
> link\_to\_remote(name, options = {}, html\_options = {})
> 
> so all your none-html options need to sit in a hash, and then all your  
> html options need to sit in another hash immediately afterwards. from  
> your previous example, something like this:
> 
> link\_to ‘design’, {:action =\> ‘design’, :id =\> survey}, {:title =\>  
> ‘Design the survey’}
> 
> HTH (and works…)
> 
> dorian

Oh I see. Thank you very much.

Actually I tried this but I left a :url =\> before the 2nd option group  
cause I’ve seen that kind of code style many times and use it by myself  
many times as well. I didn’t think of that it was this :url that broke  
the whole syntax. Now I understand the options group a bit better.
