Permalink
Browse files

Merge pull request #4 from fwoeck/master

updated README, added mount_on hint for 0.5.6 migrations
  • Loading branch information...
2 parents bc483ff + a8dbd95 commit 9404141e31fe041347955a00d9b908808cbe2b47 @trevorturk trevorturk committed Aug 12, 2011
Showing with 13 additions and 1 deletion.
  1. +13 −1 README.md
View
14 README.md
@@ -7,7 +7,7 @@ CarrierWave documentation for more detailed usage instructions.
Keep in mind that if you came up from previous versions you should make a few steps to go with it:
* change(rename in db) field name from `avatar_name` to `avatar`(appropriate to your uploader name)
-* fix you code where you need to operate with uploaded file's filename from `avatar` to `avatar_identifier`
+* fix your code where you need to operate with uploaded file's filename from `avatar` to `avatar_identifier`
Install it like this:
@@ -29,6 +29,18 @@ gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'
This used to be part of CarrierWave but has been extracted.
+## Migration from carrierwave 0.5.6
+
+The default database field for carrierwave 0.5.6 is called upload_filename with "upload" beeing the chosen mount point.
+This changed in version 0.5.7 to be just "upload".
+If you don't want to change your code in this respect, use the :mount_on option to specify
+the fieldname explicitly within the mount_uploader statement of the base class:
+
+```ruby
+class Dokument
+ mount_uploader :upload, DokumentUploader, mount_on: :upload_filename
+```
+
## Using MongoDB's GridFS store
You'll need to configure the database and host to use:

0 comments on commit 9404141

Please sign in to comment.