<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>satake7</author_name>
  <author_url>https://blog.hatena.ne.jp/satake7/</author_url>
  <blog_title>satake7’s memo</blog_title>
  <blog_url>https://satake7.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>Railsでは HashWithIndifferentAccessクラスがよしなにやってくれるので、:idでも&quot;id&quot;のどちらでもいいんだけど、自分で作った Hashはそういうわけにはいかないので、ちゃんと意識して使いましょう。シンボルと文字列は違います。 「文字列」＝「シンボル」.to_s あるいは、「シンボル」.inspect ＝ &quot;:&quot; +「文字列」の関係です。 例えば こう書けばよくわかります。 irb(main):007:0&gt; h = { &quot;aa&quot;=&gt;&quot;1&quot;, &quot;bb&quot;=&gt;&quot;2&quot;, :cc=&gt;&quot;3&quot;} =&gt; {:cc=&gt;&quot;3&quot;, &quot;bb&quot;=&gt;&quot;2&quot;, &quot;aa&quot;=&gt;&quot;1&quot;} irb(m…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsatake7.hatenadiary.org%2Fentry%2F20080524%2Fp1&quot; title=&quot;シンボルに注意 - satake7’s memo&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>2008-05-24 00:00:00</published>
  <title>シンボルに注意</title>
  <type>rich</type>
  <url>https://satake7.hatenadiary.org/entry/20080524/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
