Forum: Ruby on Rails link_to_remote with anchor

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D94466abf7e7a583ff423ef1e32c954a?d=identicon&s=25 Dustin Withers (Guest)
on 2007-01-23 23:46
(Received via mailing list)
Anybody no how to set the anchor on link_to_remote?

Thanks,
-dustin
2f9a03aa0fcfe945229cb6126eda2cb2?d=identicon&s=25 Philip Hallstrom (Guest)
on 2007-01-23 23:54
(Received via mailing list)
> Anybody no how to set the anchor on link_to_remote?

My instinct says this isn't possible, but you might look at an
:after_finish (or whatever it's called) along with javascript scrolling
to
scroll to the position you want shown...
C143acf82f94860ef6e2cba52b2de831?d=identicon&s=25 gmacgregor (Guest)
on 2007-01-24 06:56
(Received via mailing list)
You mean the actual href attribute, right? Docs say this:

link_to_remote(name, options = {}, html_options = {})

So I would assume something like this:

<%= link_to_remote("Delete this post", :url => { :controller => "post"
:action => "destroy", :id => post.id }, { :href =>
"/post/destroy/#{post.id}" }) %>
This topic is locked and can not be replied to.