johnk
May 27, 2006, 1:53am
1
Fragment identifiers, it took me 30 minutes just to figure out what
they are called.
I would like to be able to create url that looks like this:
post/view/id#comments
How do I do that with a link_to function?
link_to “Comments”, :controller => “post”, :action => “view”, :id =>
post.id ???
Thanks guys!
John K.
http://www.kopanas.com
============================================================
http://www.soen.info - Index of online software engineering knowledge
http://www.cusec.net - Canadian University Software Engineering
Conference
http://www.soenlive.com - Presentations from CUSEC
johnk
May 27, 2006, 3:39am
2
On Friday, May 26, 2006, at 7:50 PM, John K. wrote:
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
link_to “Comments”, :controller => “post”, :action => “view”, :id =>
post.id, :anchor=>‘comments’
_Kevin
johnk
May 27, 2006, 6:41pm
3
John K. wrote:
Fragment identifiers, it took me 30 minutes just to figure out what they
are called.
I would like to be able to create url that looks like this:
post/view/id#comments
How do I do that with a link_to function?
link_to “Comments”, :controller => “post”, :action => “view”, :id =>
post.id ???
Use :anchor, e.g.
link_to “Comments”,
:controller => “post”,
:action => “view”,
:id => post.id,
:anchor => “comments”
–
Philip R.
http://tzinfo.rubyforge.org/ – DST-aware timezone library for Ruby