Use select with ActiveRecord::Associations::CollectionProxy for subset selection

unstable
root 2015-05-21 11:04:03 +05:00
parent bdf30dd383
commit ee1a366e2b
1 changed files with 2 additions and 2 deletions

View File

@ -1270,8 +1270,8 @@ class Db
end
end
if search_term
note_list.delete_if do |n|
!n.attribute_names.any? { |a| n[a.intern].to_s.match(search_term) }
note_list = note_list.select do |n|
n.attribute_names.any? { |a| n[a.intern].to_s.match(search_term) }
end
end