FogBugz #136: Fallback path to dummy buddy image. Otherwise the asset pipeline goes on strike in production.
This commit is contained in:
parent
f8f8d94ee3
commit
a4d0cabe98
1 changed files with 7 additions and 6 deletions
|
|
@ -21,12 +21,13 @@ class AvatarUploader < CarrierWave::Uploader::Base
|
|||
end
|
||||
|
||||
# Provide a default URL as a default if there hasn't been a file uploaded:
|
||||
# def default_url
|
||||
# # For Rails 3.1+ asset pipeline compatibility:
|
||||
# # asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
||||
#
|
||||
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
||||
# end
|
||||
def default_url
|
||||
# For Rails 3.1+ asset pipeline compatibility:
|
||||
# asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
|
||||
|
||||
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
||||
"/assets/" + [version_name, "dummy_buddy_m.png"].compact.join('_')
|
||||
end
|
||||
|
||||
# Process files as they are uploaded:
|
||||
# process :scale => [200, 300]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue