<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osn_th</author_name>
  <author_url>https://blog.hatena.ne.jp/osn_th/</author_url>
  <blog_title>カタカタブログ</blog_title>
  <blog_url>https://totech.hateblo.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Ruby</anon>
  </categories>
  <description>Railsはroutes.rbでresourcesメソッドを使うことで、複数リソースに対するRESTfulインタフェースを定義できる。このとき、一つのリソースを特定するためには通常:idパラメータがデフォルトで使われるが、このidはRailsが自動採番しているため、場合によっては分かりやすさ優先でid以外のカラム値でリソースを一意に特定できるものがある場合は、そちらをURLに使いたい場合もある。 今回はそのような場合に、id以外の項目をURLに使うための変更方法をまとめてみた。いつものように、検証した環境のバージョンを示す。 OS X EI Capitan バージョン 10.11.2 Rail…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftotech.hateblo.jp%2Fentry%2F2015%2F12%2F19%2F205018&quot; title=&quot;Rails 4.2 URLにid以外のカラム値を使う - カタカタブログ&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>http://cdn-ak.f.st-hatena.com/images/fotolife/o/osn_th/20151219/20151219204912.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-12-19 20:50:18</published>
  <title>Rails 4.2 URLにid以外のカラム値を使う</title>
  <type>rich</type>
  <url>https://totech.hateblo.jp/entry/2015/12/19/205018</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
