more work

This commit is contained in:
albert
2010-10-19 19:34:31 -04:00
parent cb3d7e9e9b
commit acdce69f20
48 changed files with 2494 additions and 1585 deletions

View File

@@ -7,8 +7,8 @@ class Upload < ActiveRecord::Base
attr_accessor :file, :image_width, :image_height, :file_ext, :md5, :file_size
belongs_to :uploader, :class_name => "User"
belongs_to :post
before_validation_on_create :initialize_uploader
before_validation_on_create :initialize_status
before_validation :initialize_uploader, :on => :create
before_validation :initialize_status, :on => :create
before_create :convert_cgi_file
validate :uploader_is_not_limited