<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ayaketan</author_name>
  <author_url>https://blog.hatena.ne.jp/ayaketan/</author_url>
  <blog_title>ayaketanのプログラミング勉強日記</blog_title>
  <blog_url>https://ayaketan.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>以前、必要なカラムの値を配列で取得する方法を下記の記事で紹介しました。 必要なカラムの値を配列で取得する方法 - ayaketanのプログラミング勉強日記しかし、もっとスマートな方法があることを知りました。 しかも、その方法だと必要な複数のカラムの値を配列で取得することができます。以前の書き方 User.select(:id).where(:group_id =&gt; 2).map(&amp;:id) pluckを使用した場合 User.where(:group_id =&gt; 2).pluck(:id) さらに、複数のカラムの値を取得する場合 User.where(:group_id =&gt; 2).pluck…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fayaketan.hatenablog.com%2Fentry%2F2013%2F11%2F13%2F141853&quot; title=&quot;Rails4 pluckで必要なカラムの値を配列で取得する - ayaketanのプログラミング勉強日記&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>2013-11-13 14:18:53</published>
  <title>Rails4 pluckで必要なカラムの値を配列で取得する</title>
  <type>rich</type>
  <url>https://ayaketan.hatenablog.com/entry/2013/11/13/141853</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
