Re: HTML equivalent to my link_to_remote statement



Taneal Bhandari wrote:
I have the following link_to_remote statement that I need to convert
into an <a href> tag, but can't figure it out. I looked at the
rubyonrails api page and did a google search, but they don't have any
examples similar to mine where I can figure it out. Here's my
statement:

<%= link_to_remote tag.name,
:url => {:action => "tag_selector", :id => @order.id},
:html => {:id => tag.id, :class => "tag"},
:with => "'tag=" + tag.id.to_s + "'"%>

I need help understanding the question. (But please consider the Ruby-on-Rails Talk forum at news://news.gmane.org:119/gmane.comp.lang.ruby.rails in future!)

Link_to_remote translates into an a with an href of # and an onclick of a ton of JavaScript. The code you wrote is already converted. Try this:

<%=
x = link_to_remote tag.name,
:url => {:action => "tag_selector", :id => @order.id},
:html => {:id => tag.id, :class => "tag"},
:with => "'tag=" + tag.id.to_s + "'"
puts x
x
%>

When your page renders (or when - ahem - your functional tests run), you should see your link_to_remote statement converted into an <a href> tag.

What will you do with it now?
.



Relevant Pages

  • Re: Build Numbers in ASPX Pages
    ... asp.net faq: http://asp.net.do/faq/ ... doing a google search. ... maybe its own tag. ... each time a developer updates it (we all know how much we developers ...
    (microsoft.public.dotnet.framework.aspnet)
  • Build Numbers in ASPX Pages
    ... doing a google search. ... maybe its own tag. ... do this and not just manually putting in a tag and updating the number ... each time a developer updates it (we all know how much we developers ...
    (microsoft.public.dotnet.framework.aspnet)
  • search results question..
    ... in google search results (and in other engines too, I think), the first line corresponds to what's in in web page right? ... however, sometimes in results for a page on my site instead of content in tag it show shows content of the page, from inside tag.. ...
    (alt.internet.search-engines)
  • Re: Still not in Google
    ... David Baxter wrote: ... > into the Google search box and it will show you how many, if any, pages ... >> Not sure I understand what you are saying. ... > tag I ...
    (microsoft.public.frontpage.client)