Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
More readable doc
Browse files Browse the repository at this point in the history
  • Loading branch information
murbanski committed Aug 26, 2011
1 parent ce9d7ea commit fc0349d
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions README.md
Expand Up @@ -308,11 +308,9 @@ processors, where a defined `watermark` processor is invoked after the
Deploy
------

Paperclip is aware of new attachment styles you have added in previous deploy. The only thing you should do after each deployment is to call:

rake paperclip:refresh:missing_styles

It will store current attachment styles in `RAILS_ROOT/public/system/paperclip_attachments.yml` by default. You can change it by:
Paperclip is aware of new attachment styles you have added in previous deploy. The only thing you should do after each deployment is to call
`rake paperclip:refresh:missing_styles`. It will store current attachment styles in `RAILS_ROOT/public/system/paperclip_attachments.yml`
by default. You can change it by:

Paperclip.registered_attachments_styles_path = '/tmp/config/paperclip_attachments.yml'

Expand All @@ -328,12 +326,7 @@ Here is an example for Capistrano:
after("deploy:update_code", "deploy:build_missing_paperclip_styles")

Now you don't have to remember to refresh thumbnails in production everytime you add new style.
Unfortunately it does not work with dynamic styles:

has_attached_file :avatar,
:styles => lambda{ |attachment| attachment.instance.other == 'a' ? {:thumb => "50x50#"} : {:large => "400x400"} }

It just ignores them.
Unfortunately it does not work with dynamic styles - it just ignores them.

If you already have working app and don't want `rake paperclip:refresh:missing_styles` to refresh old pictures, you need to tell
Paperclip about existing styles. Simply create paperclip_attachments.yml file by hand. For example:
Expand Down

0 comments on commit fc0349d

Please sign in to comment.