すでに、アップロード済みのorg_imageのavatarをnew_imageのavatarにコピーする場合。
org_image.rb
class OrgImage < ActiveRecord::Base
mount_uploader :avatar, ImageUploader
xxxxx
xxxxx
end
new_image.rb
class NewImage < ActiveRecord::Base
mount_uploader :avatar, ImageUploader
xxxxx
xxxxx
end
controller.rb
def image_copy
org_image = OrgImage.find(id)
new_image = NewImage.new
new_image.avatar = org_image.avatar.file
new_image.save
end