Hi everyone:
I,m using the following code and I have some questions
<div id="comment_<%= comment.id.to_s %>">
<%= link_to_remote( "Show Body",
:update => "comment_#{comment.id.to_s}",
:url => { :action => :show_body,
:id => comment }) %>
</div></td>
what exactly do :update,:url,:id, I mean what is the action they done??
Other question
I want to refresh an image, but the image is not a class of the code,
because Iuse the image tag, I dont know where I have to start for do
that, anyone can give me a tip
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Guille San wrote:> <div id="comment_<%= comment.id.to_s %>"> > <%= link_to_remote( "Show Body", > :update => "comment_#{comment.id.to_s}", > :url => { :action => :show_body, > :id => comment }) %> > </div></td>The official documentation for link_to_remote explains this probably better than I could myself: http://www.railsbrain.com/api/rails-2.3.2/doc/index.html?a=M002467&name=link_to_remote Basically though, :update is the id of the DOM element to be updated (<div id="comment_#1">...content...</div>. URL in this case is the "show_body" action of the current controller with the id of the current comment. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.