title: Ruby On Rails: how to return a collection (or array) of values from a query
body: <p>I have a parent table called <code>FORMS</code> that has many <code>ITEMS</code> in ROR, and <code>ITEMS</code> belongs to <code>FORMS</code>. I need to grab the quantity values from <code>ITEMS</code> that belongs to the last entry in <code>FORMS</code> table. </p>
  
  <p><strong>form.rb</strong></p>
  
  <pre><code>class Form &lt; ApplicationRecord
    has_many :items
  end
  </code></pre>
  
  <p><strong>item.rb</strong></p>
  
  <pre><code>class Item &lt; ApplicationRecord
    belongs_to :form
  end
  </code></pre>
  
  <p><strong>Rails Console</strong></p>
  
  <pre><code>2.3.1 :024 &gt; Form.last.items.quantities
         Form Load (0.6ms)  SELECT  `forms`.* FROM `forms` ORDER BY `forms`.`id` DESC LIMIT 1
  NoMethodError:   Item Load (0.3ms)  SELECT `items`.* FROM `items` WHERE `items`.`form_id` = 63
  undefined method `quantities' for...
  </code></pre>