in my users model I have a paperclip setup like this:
has_attached_file :profile_pic,
:styles => {:large => "300x300>", :medium => "150x150>", :small => "50x50#", :thumb => "30x30#" },
:default_style => :thumb,
:default_url => '/images/:attachment/default_:style.png',
How do I make the default URL, include the full URL?
http://0.0.0.0:3000/images/:attachment/default_:style.png
or http://sitename.com/images/:attachment/default_:style.png
In Rails 3 add:
include Rails.application.routes.url_helpersin your model.In Rails 2 add:
include ActionController::UrlWriterin your model.Then
root_urlcontains the base url of your app. So then you can do: