Kad Kerforn
2006-Oct-01 10:13 UTC
link_to_remote, how to specify an html id= ? what''s wrong ?
I wrote the following, but no id appears in the html output, what''s wrong ? <%= link_to_remote("Toggle View", :url => {:action => ''toggleview''}, :html => {:id => ''toggle_display''}) %> thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Thibaut Barrère
2006-Oct-01 11:08 UTC
Re: link_to_remote, how to specify an html id= ? what''s wrong ?
> > <%= link_to_remote("Toggle View", :url => {:action => ''toggleview''}, > :html => {:id => ''toggle_display''}) %> >html_options must be passed as the third parameter of type hash (here you pass one string, then one hash) try : link_to_remote("Toggle View", { :url => {:action => ''toggleview''} }, {:id => ''toggle_display''}) cheers Thibaut --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Kad Kerforn
2006-Oct-01 12:03 UTC
Re: link_to_remote, how to specify an html id= ? what''s wron
Thibaut Barrère wrote:>> >> <%= link_to_remote("Toggle View", :url => {:action => ''toggleview''}, >> :html => {:id => ''toggle_display''}) %> >> > > html_options must be passed as the third parameter of type hash (here > you > pass one string, then one hash) > > try : link_to_remote("Toggle View", { :url => {:action => ''toggleview''} > }, > {:id => ''toggle_display''}) > > cheers > > ThibautGOT IT... ! thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---