Created
August 20, 2009 07:25
-
-
Save jugyo/170890 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sample to clone attachement_fu object. | |
class Foo < ActiveRecord::Base | |
has_attachment :storage => :file_system, :path_prefix => 'assets/foo' | |
# create clone, but thumbnails are not cloned. | |
def create_clone | |
returning clone do |c| | |
c.temp_paths.unshift create_temp_file | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment