paperclip to_file replacement to duplicate files after create
100 views
Skip to first unread message
Daniel Lorenz
unread,
Jun 1, 2012, 4:13:10 PM6/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to papercli...@googlegroups.com
Hi Guys,
I updated paperclip to new version and missing "to_file". I read the issue-tracker on github and search in this group, but i can't find a proper answer. I have a Container-Model where a user can upload sample images. Each Container has many related Samples. For each Sample which is associated to a Container a copy of the uploaded image should copied if a Sample has no own Image.
In my Container-Model I has a method with this part:
mediaassets.each do |mediaasset| unless self.asset_file_name.nil? mediaasset.asset = self.asset.to_file end mediaasset.save! end