I’m trying to expand on a blog tutorial and one thing I can’t figure out
is how to use anchors within pages.
For example say I have sections on a page with anchors like <a
name=section1" through <a name=section6". Using older non-rails
methods I would construct urls that contains the pound symbol and anchor
name in the url such as http://www.foobar.com/page.html#section1.
Another practice I use to use is appending just the pound sign at the
end of the url to jump to the top of the current page.
I’ve been able to append name/value pairs to the end of urls using
hashes within link_to statements. It seems the necessary question mark
is added automagically before the name/value pair get added. I’m not
sure how to add on to the url without the question mark being added.
Has anyone figured out a way to do that? I know there are a few other
ways I could present the content using different approaches but I would
like to figure out how to anchor down the pages if possible.