<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kamatimaru</author_name>
  <author_url>https://blog.hatena.ne.jp/kamatimaru/</author_url>
  <blog_title>delhi09の勉強日記</blog_title>
  <blog_url>https://kamatimaru.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>Railsではformのアクションを指定する場合などにリクエストパスをベタ書きすることは少なく、xxx_pathのような自動で定義されている変数を使います。 変数名には法則があるのですが、慣れないうちはわからなくなることが多いです。 その場合はrails routeコマンドで確認できます。 以下のような結果が表示されるので、使いたいパスを探してnew_admin_tag_pathのように末尾に_pathをつければOKです。 # 省略 new_admin_tag GET /admin/tags/new(.:format) admin/tags#new edit_admin_tag GET /ad…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkamatimaru.hatenablog.com%2Fentry%2F2025%2F11%2F03%2F233637&quot; title=&quot;Railsでリクエストパス変数がわからなくなったらrails routesコマンドで確認できる - delhi09の勉強日記&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>2025-11-03 23:36:37</published>
  <title>Railsでリクエストパス変数がわからなくなったらrails routesコマンドで確認できる</title>
  <type>rich</type>
  <url>https://kamatimaru.hatenablog.com/entry/2025/11/03/233637</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
