Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael <raphael@joindiaspora.com>2010-08-02 21:05:34 +0400
committerRaphael <raphael@joindiaspora.com>2010-08-02 21:05:34 +0400
commitb8ae6b44a2bd44abad8b7b04c1c4584a16dba679 (patch)
tree54c15008a74b302250b64441005e39cea7c62d64 /app/uploaders
parentdc1a164b67cae7c820be75cb2dff454d0348fd45 (diff)
RS; Image filename is now the Photo model id
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/image_uploader.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/uploaders/image_uploader.rb b/app/uploaders/image_uploader.rb
index 7bf9cf2fe..af157647d 100644
--- a/app/uploaders/image_uploader.rb
+++ b/app/uploaders/image_uploader.rb
@@ -10,7 +10,11 @@ class ImageUploader < CarrierWave::Uploader::Base
def extension_white_list
%w(jpg jpeg gif png)
end
-
+
+ def filename
+ model.id.to_s + File.extname(@filename)
+ end
+
version :thumb_small do
process :resize_to_fill => [30,30]
end