Skip to content
Snippets Groups Projects
Commit 60ed315d authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'fix-collection_item_serializer' into 'master'

fix destroy items

See merge request !335
parents 5c89aa32 6d0490ff
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ class Collection < ApplicationRecord
def delete_items(items)
items.each do |item|
CollectionItem.where(collection: self, collectionable: item[:type].constantize.find(item[:id])).destroy_all
CollectionItem.find(item[:id]).destroy
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment