class Addressbook::PhotoUploader
Public Instance Methods
extension_white_list()
click to toggle source
Add a white list of extensions which are allowed to be uploaded. For images you might use something like this:
# File lib/addressbook/photo_uploader.rb, line 22 def extension_white_list %w(jpg jpeg gif png) end
scale(width, height)
click to toggle source
Process files as they are uploaded: process :scale => [1200, 300]
# File lib/addressbook/photo_uploader.rb, line 11 def scale(width, height) resize_to_fill(width, height) end