Unnamed
public ruby v1 · immutableclass 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