This plugin when used in conjunction with the paperclip file attachment plugin allows you to attach more than one file to the model. (This project is no longer maintained and it is looking for a good home)
Switch branches/tags
Nothing to show
Failed to load latest commit information.
generators/polymorphic_paperclip the usage instructions were wrong. Mar 31, 2009
lib we need to ensure that we return the result of the destroy action. Apr 7, 2009
spec schema change to allow for latest paperclip from github (removed unec… Nov 6, 2008
MIT-LICENSE initial commit Jun 28, 2008
README.textile fixed a small typo in the readme Jun 29, 2008



This plugin allows users of the Paperclip plugin to easily share attached files between
multiple models. Essentially, polymorphic paperclip transparently saves the attached files
into a separate asset’s table and associates the the model to the asset through a polymorphic
attachings table.

The Paperclip Plugin must also be installed for PolyMorphicPaperclip to work.
Get paperclip here:


class PhotoEssay < ActiveRecord::Base

You can also add a counter_cache to your model if you wish.

class Essay < ActiveRecord::Base
acts_as_polymorphic_paperclip :counter_cache => true

essay.assets.asset.detach -or- @essay.assets.detach(asset)

Helper methods

There is one helper method so far used to determine if the asset can be displayed in a browser

@essay.assets.first.browser_safe? # => returns true or false

Copyright © 2008 PolymorphicPaperclip Mark Daggett, released under the MIT license