Created
November 10, 2009 16:35
-
-
Save ottbot/231012 to your computer and use it in GitHub Desktop.
This file contains 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
class Story < Sequel::Model | |
require 'image_science' | |
attr_accessor :photo_upload | |
def after_save | |
super | |
process_upload! | |
end | |
def process_upload! | |
root = File.dirname(__FILE__).gsub('lib','public/photos/') | |
path = root << (self.reload.id).to_s | |
"snip..." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment