<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Ruby on Rails Notes &#187; anchor</title> <atom:link href="http://railsnotes.com/tag/anchor/feed/" rel="self" type="application/rss+xml" /><link>http://railsnotes.com</link> <description>A code-heavy brain dump of stuff I come across working on Ruby on Rails projects including Models, ActiveRecord, Views, Controllers, RESTful rails, deployment, server stuff, etc.</description> <lastBuildDate>Sun, 29 Aug 2010 23:45:16 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>How to link to an anchor</title><link>http://railsnotes.com/275-how-to-link-to-an-anchor/</link> <comments>http://railsnotes.com/275-how-to-link-to-an-anchor/#comments</comments> <pubDate>Thu, 23 Apr 2009 06:05:55 +0000</pubDate> <dc:creator>Melvin Ram</dc:creator> <category><![CDATA[Other]]></category> <category><![CDATA[anchor]]></category> <category><![CDATA[helpers]]></category> <category><![CDATA[link_to]]></category> <category><![CDATA[views]]></category><guid
isPermaLink="false">http://www.railsnotes.com/?p=275</guid> <description><![CDATA[If you need to link to a particular part of your website, link anchors are what you need. And linking to link anchors is really simple in Rails. Here&#8217;s an example: &#60;%= link_to "Google Analytics", features_path(:anchor =&#62; "analytics") %&#62; This will output: &#60;a href="/features_path#analytics"&#62;Google Analytics&#60;/a&#62; Here&#8217;s another example: &#60;%= link_to "San Francisco Offices", :controller =&#62; [...]]]></description> <content:encoded><![CDATA[<p></p><p>If you need to link to a particular part of your website, link anchors are what you need. And linking to link anchors is really simple in Rails. Here&#8217;s an example:</p><pre>&lt;%= link_to "Google Analytics", features_path(:anchor =&gt; "analytics") %&gt;</pre><p>This will output:</p><pre>&lt;a href="/features_path#analytics"&gt;Google Analytics&lt;/a&gt;</pre><p>Here&#8217;s another example:</p><pre>&lt;%= link_to "San Francisco Offices", :controller =&gt; 'locations',
                                     :action =&gt; 'index',
                                     :anchor =&gt; 'sf' %&gt;</pre><p>As you&#8217;ve probably noticed, the key part is <strong>:anchor =&gt; &#8216;analytics&#8217;</strong></p> ]]></content:encoded> <wfw:commentRss>http://railsnotes.com/275-how-to-link-to-an-anchor/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 6/16 queries in 0.020 seconds using disk

Served from: railsnotes.com @ 2010-09-09 07:35:00 -->