Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Paperclip compatibility #2

Open
wants to merge 1 commit into from

1 participant

Will Farrington
Will Farrington

Some versions of Paperclip expect a #read method for UploadedFile. This commit just uses File#read to handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 17, 2011
Will Farrington wfarr Add a #read method to UploadedFiles to work with Paperclip. 118750d
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 lib/mod_porter.rb
4 lib/mod_porter.rb
@@ -16,6 +16,10 @@ def initialize(options)
16 16 @content_type = options[:content_type]
17 17 end
18 18
  19 + def read
  20 + File.read(self.path)
  21 + end
  22 +
19 23 def to_tempfile
20 24 return File.new(self.path)
21 25 end

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.