I am trying to attach an image via paperclip. But not working. The default image is showing fine. But I cant upload images using the browse option. Here is the error am getting.
"1 error prohibited this listing from being saved: Image has an extension that does not match its contents"
I have added the validation in model aswell. Here is mylistings.rb which is in models.
class Listing < ActiveRecord::Base
has_attached_file :image, :styles => { :medium => "200x", :thumb => "100x100>" }, :default_url => "default.jpg"
validates_attachment :image, content_type: { content_type: /\Aimage\/.*\Z/ }
end