I am using amoeba gem for duplicating record and i am using carrierwave for uploading images.
I tried to copy the images from the associated model using amoeba, it only copies the data from the original record(it copies only icon name,file attributes in the database), but the images are not present in filesystem (in Public folder)
This is my model
class Book < ActiveRecord::Base
has_many :images
self.class.amoeba do
include_field [:images]
end
end
class Image < ActiveRecord::Base
belongs_to :book
end
I used the following method
duplicate = @book.amoeba_dup
duplicate.save
I tried with the following in Book model
amoeba do
include_field :images
end
Help me to solve this