app/services/linker.rb in rademade_admin-0.1.5 vs app/services/linker.rb in rademade_admin-0.1.6

- old
+ new

@@ -11,10 +11,12 @@ def link(id) process_link { |old_data| old_data << @related_data_item.relation.related_entities(id) } end def unlink(id) - process_link { |old_data| old_data - [@related_data_item.relation.related_entities(id)] } + process_link { |old_data| + old_data.delete_if { |data_item| data_item.id.to_s == id.to_s } + } end private def process_link