I am using carrierwave and cloudinary gems to attach images on my article model. The create function works ok but when i need to update the existin images i am getting the bellow error :
'undefined method `reject' for "image/upload/v1557497204/hqef7unyuvfsva933idv.jpg":String'.
However if i go back and refresh the article page the new image is there
def update
@article = Article.find(params[:id])
if @article.update(article_params)#the error raised here
flash[:notice] = "Your Article was Created"
redirect_to @article
else
render 'edit'
end
end
has_many :comments , dependent: :destroy mount_uploaders :image, ImageUploader serialize :image, JSON
Up loader ```` class ImageUploader < CarrierWave::Uploader::Base # Include RMagick or MiniMagick support: # include CarrierWave::RMagick # include CarrierWave::MiniMagick include Cloudinary::CarrierWave end – Charalambos Pouroutides