title: How to remove an object from the ActiveRecord::Relation object
body: <p>I am loading data from the DB and get it back in this object:</p>
  
  <pre><code>#&lt;ActiveRecord::Relation [#&lt;CarStatusDefinition id: 10, status_name: "New Approval", keyword: 'NEW', ...&gt;, #&lt;CarStatusDefinition id: 11, status_name: "Used", keyword: 'USED', ...&gt;, ...]&gt;
  </code></pre>
  
  <p>When I have this data loaded in ruby, then, in some cases, I need to remove an item in this object - specifically, the one with the keyword <strong>USED</strong>.</p>
  
  <p>I tried to do it like this:</p>
  
  <pre><code>if @record.used.blank?
    status_collection = status_collection.reject! { |hash| hash[:keyword] == 'USED' }
  end
  </code></pre>
  
  <p>However, the item with the keyword <strong>USED</strong> (with <code>id 11</code> is still included in the final object).</p>
  
  <p>How do I remove the object with id <code>11</code> from the final hash? What am I overlooking here?</p>