<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>TAKAyuki_atkwsk</author_name>
  <author_url>https://blog.hatena.ne.jp/TAKAyuki_atkwsk/</author_url>
  <blog_title>Blogaomu</blog_title>
  <blog_url>https://www.blogaomu.com/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>備忘録</anon>
  </categories>
  <description>link_toでアンカーリンクを作成する場合は、:anchorでリンク先のidを指定します。Railsのapiリファレンスに書いてありました。以下はその例です。 &lt;%= link_to 'プロフィールの設定', :controller =&gt; 'settings', :anchor =&gt; 'profile') %&gt; # =&gt; &lt;a href=&quot;/settings#profile&quot;&gt;プロフィールの設定&lt;/a&gt; &lt;%= link_to 'コメントする', diary_path(diary, :anchor =&gt; 'new_comment') %&gt; # =&gt; &lt;a href=&quot;/diaries/:id…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.blogaomu.com%2Fentry%2Fcreate-anchor-on-rails&quot; title=&quot;Railsのlink_toでアンカーリンクを作成する方法 - Blogaomu&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-04-18 12:00:00</published>
  <title>Railsのlink_toでアンカーリンクを作成する方法</title>
  <type>rich</type>
  <url>https://www.blogaomu.com/entry/create-anchor-on-rails</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
