Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
Election Day Standup, 06/08/2010

Help

How do I migrate paperclip attachments from one model to another?

A Pivot wants to do his civic duty of embracing change. This means refactoring his domain model to suit the emerging requirements of his product team. Unfortunately, this also means he has to move a paperclip attachment from one model to another. Paperclip does not appear to have a built in way to do this.

The opinion of the group was to use the brute-force solution: write some code to do the migration yourself. If you are using Amazon S3 for storage (which this project is), you can do an S3 ‘cp’ command to move the assets from one path to another. At the end, you can use the rake command ‘paperclip:refresh:thumbnails’ to re-generate the thumbnails.

If you want to do this by hand, cyberduck has a nice interface for batch re-naming of files on S3.

Interesting

Amazon CloudFront now supports HTTPS

They also dropped their prices.

IE has a limit of 31 CSS files.

This has bitten many Pivots over the years. Your 32nd (and up) CSS file will be silently ignored.

Comments
  1. Mat Schaffer says:

    You should be able to get around the 31 sheet limit by using @import. Pretty sure the limit is against

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *