Hello! There is such a sample:

2.2.3 :038 > i => #<ActiveRecord::Relation [#<Issue id: 110253, tracker_id: 5, project_id: 18, subject: "Разработка заявки ", description: "Необходимо разработать ...", due_date: nil, category_id: nil, status_id: 2, assigned_to_id: 2529, priority_id: 4, fixed_version_id: nil, author_id: 3016, lock_version: 49, created_on: "2016-04-21 11:23:51", updated_on: "2016-08-09 07:14:35", start_date: "2016-04-21", done_ratio: 0, estimated_hours: nil, parent_id: nil, root_id: 110253, lft: 1, rgt: 2, is_private: false, closed_on: nil>, #<Issue id: 112486, tracker_id: 4, project_id: 18, subject: "и о...", description: "В необходимо:\r\n1) Пр...", due_date: nil, category_id: nil, status_id: 13, assigned_to_id: 2529, priority_id: 4, fixed_version_id: nil, author_id: 3016, lock_version: 18, created_on: "2016-05-23 07:07:38", updated_on: "2016-08-08 14:40:30", start_date: "2016-05-23", done_ratio: 0, estimated_hours: nil, parent_id: nil, root_id: 112486, lft: 1, rgt: 2, is_private: false, closed_on: nil>]> 

I need to remove from this sample, say, an element with ID 112486. If you do this: i.delete(112486) then the element will be completely removed from the database. How to remove it from this sample?

    1 answer 1

    As one of the possible options

     i = i.reject{|x| x.id == 112486}