All pastes #107652 Raw Edit

Unnamed

public ruby v1 · immutable
#107652 ·published 2006-07-31 02:48 UTC
rendered paste body
class Image < ActiveRecord::Base  belongs_to :categories    @@images_path = "/home21b/sub001/sc18296-XBRN/images/"  def readable_size()    size_in_kb = self.size.to_i / 1024    return size_in_kb.to_s + " kb"    end    def move(category_id)        from = @@images_path + self.category.path + self.filename      @categories = Category.find(category_id)    to = @@images_path + @categories.path        #right now we just want to see it working    #return from + " => " + to          endend