Using Carrierwave and Fog to upload images to to S3, I want to check if image version is exist.
I'm using this code (inspired by this answer) to check if it's exist or not
- if post.image_url(:thumb).file.exists?
.media-cover{:style => "background-image: url(#{post.image_url(:thumb)}"}
But I'm getting this error
NoMethodError at /
undefined method `file' for #<String:0x007fb7ab7af980>
I can access the default version with post.image_url