title: rails4 pluck with order and limit
body: <p>In my sidebar I display the freshly created user profiles. Profile <code>belongs_to</code> user and user <code>has_one_profile</code>. I realized that I only use 3 columns from the profile table so it would be better to use pluck. I also have a <code>link_to user_path(profile.user)</code> in the partial, so somehow I have to tell who the user is. At the moment I'm using <code>includes</code>, but I don't need the whole user table. So I use to many columns both from the user and the profile tables.</p>
  
  <p>How can I optimize this with pluck? I tried a few versions, but always got some error (most of the time profile.user is not defined).</p>
  
  <p>My current code:</p>
  
  <pre><code>def set_sidebar_users
    @profiles_sidebar = Profile.order(created_at: :desc).includes(:user).limit(3) if user_signed_in?
  end
  
  create_table "profiles", force: :cascade do |t|
    t.integer  "user_id",      null: false
    t.string   "first_name",   null: false
    t.string   "last_name",    null: false
    t.string   "company",      null: false
    t.string   "job_title",    null: false
    t.string   "phone_number"
    t.text     "description"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "avatar"
    t.string   "location"
  end
  </code></pre>