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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to