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. -- Posted via http://www.ruby-forum.com/.
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 Sky Yin wrote:> 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. >-- -- I do things for love or money
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...) > > dorianOh 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. -- Posted via http://www.ruby-forum.com/.