Closed stepheneb closed 7 years ago
I am trying to clone my Meeting object.
It all works except for copying the the PaperClip image attachment in one of the polymorphic Item objects.
When I added a block to process these model objects separately it seems the block is never evaluated.
I then added a debugger halt and it never got called either.
new_meeting = self.deep_clone include: { topics: { topic_items: :item } } do |original, kopy| byebug kopy.image = original.image if kopy.respond_to?(:image) end
I've duplicated this scenario in the tests for deep_cloneable ... and it works in the tests!
So obviously there is a difference I haven't discovered yet.
Found the issue, not surprised it was my fault.
I am trying to clone my Meeting object.
It all works except for copying the the PaperClip image attachment in one of the polymorphic Item objects.
When I added a block to process these model objects separately it seems the block is never evaluated.
I then added a debugger halt and it never got called either.