Fixed Photos, and Carrierwave initializer

This commit is contained in:
Raphael 2010-08-02 21:31:14 -07:00
parent da3bf35d81
commit e3c28c4fee
3 changed files with 6 additions and 6 deletions

View file

@ -20,7 +20,7 @@ class Photo < Post
photo = Photo.new(params)
photo.image.store! image_file
photo
photo.save
end
after_save :log_save_inspection

View file

@ -11,9 +11,9 @@ class ImageUploader < CarrierWave::Uploader::Base
%w(jpg jpeg gif png)
end
def filename
model.id.to_s + File.extname(@filename)
end
# def filename
# model.id.to_s + File.extname(@filename)
# end
version :thumb_small do
process :resize_to_fill => [30,30]

View file

@ -1,6 +1,6 @@
CarrierWave.configure do |config|
config.grid_fs_database = "#diaspora-#{Rails.env}"
config.grid_fs_host = 'localhost'
config.grid_fs_database = MongoMapper::database.name
config.grid_fs_host = MongoMapper::connection.host
config.grid_fs_access_url = "/images"
config.storage = :grid_fs
#config.storage = :file