<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xiaoniu</author_name>
  <author_url>https://blog.hatena.ne.jp/xiaoniu/</author_url>
  <blog_title>xiaoniu’s blog</blog_title>
  <blog_url>https://xiaoniu.hateblo.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>Rubyの配列にjoinメソッドの使い方 配列の要素の間に文字列を挟んで連結し、文字列を返す [a,b,c].join(&quot;-&quot;) #=&gt;&quot;a-b-c&quot; RailsのModelにjoinsメソッドの使い方 Railsのモデルに使ったjoinsはモデルとテーブルが内部結合（INNER JOIN）して結合先のリストを取得する User.joins(:children) #=&gt; childrenがあるUserたちだけ取得する SQL文は以下のようになります SELECT u.* FROM users u INNER JOIN children c ON u.id = c.user_id</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxiaoniu.hateblo.jp%2Fentry%2F2020%2F05%2F21%2F173615&quot; title=&quot;RailsのActiveRecordに使ったjoinsとRubyの配列join - xiaoniu’s blog&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>2020-05-21 17:36:15</published>
  <title>RailsのActiveRecordに使ったjoinsとRubyの配列join</title>
  <type>rich</type>
  <url>https://xiaoniu.hateblo.jp/entry/2020/05/21/173615</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
