title: rails ActiveRecord find in console
body: <p>When I'm in the Rails 3.2 console, I can do this just fine:</p>
  
  <pre><code>p = Person.last
  p.last_name
  </code></pre>
  
  <p>and it prints the last name.</p>
  
  <p>But when I try to find it by the <code>id</code>, it's able to locate the single
  record and store it in my variable <code>p</code>, but I can't print the <code>last_name</code>
  column. For example:</p>
  
  <pre><code>p = Person.where(id: 34).limit(1)
  </code></pre>
  
  <p>printing <code>p</code> here shows all the columns but <code>p.last_name</code> says this</p>
  
  <pre class="lang-none prettyprint-override"><code>NoMethodError: undefined method `last_name' for
  #&lt;ActiveRecord::Relation:0x000000055f8840&gt;
  </code></pre>
  
  <p>any help would be appreciated.</p>