nzadrozny (owner)

Revisions

gist: 222510 Download_button fork
public
Public Clone URL: git://gist.github.com/222510.git
Embed All Files: show embed
working with paperclip tempfiles.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Foo
 
  has_attached_file :image
 
  def image=(image)
    if super(image)
      do_stuff_with!(@temp_uploaded_file)
    end
  end
 
  def do_stuff_with!(file)
    # extract metadata, add to metadata, post-process, whateva'
  end
 
end