themen ueberarbeitet attachments verwalten

This commit is contained in:
2014-06-09 23:14:05 +05:30
parent babbfb7d73
commit 6451c0f175
22 changed files with 245 additions and 38 deletions

View File

@@ -6,6 +6,9 @@ class AttachmentUploader < CarrierWave::Uploader::Base
include CarrierWave::RMagick
# include CarrierWave::RMagick
# include CarrierWave::MiniMagick
def root
Rails.root.join 'public/'
end
# Choose what kind of storage to use for this uploader:
storage :file
@@ -20,6 +23,9 @@ class AttachmentUploader < CarrierWave::Uploader::Base
version :thumb do
process :resize_to_fill => [64, 64]
end
version :thumb_small do
process :resize_to_fill => [32, 32]
end
# Provide a default URL as a default if there hasn't been a file uploaded:
# def default_url