Hi i'm using paperclip to upload and save the company avatar on my app. This is how it looks on company model:
has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/missing.png"
validates_attachment_content_type :avatar, :content_type => /\Aimage\/.*\Z/
I'm also using an initializer, paperclip.rb:
Paperclip::Attachment.default_options[:storage] = :fog
Paperclip::Attachment.default_options[:fog_credentials] = {:provider => "Local", :local_root => "#{Rails.root}/public"}
Paperclip::Attachment.default_options[:fog_directory] = ""
Paperclip::Attachment.default_options[:fog_host] = "http://localhost:3000"
Images are saved correctly, but when i try to display them like this:
<%= image_tag @company.avatar.url(:thumb) %>
It only shows the name of the file and no image.
The html looks like this:
<img alt="Mini cooper" src="http://localhost:3000/companies/avatars/000/000/003/thumb/mini-cooper.jpg%3F1416616058">
And if i take out the characters after .jpg like the following:
http://localhost:3000/companies/avatars/000/000/003/thumb/mini-cooper.jpg
I see the image just fine. But the helper just builds the url with those extra characters. Any ideas?