bug fixes with uploaded file pending posts

This commit is contained in:
albert
2010-02-09 01:11:42 -05:00
parent 39424ca52b
commit c6d4a13e7d
3 changed files with 43 additions and 12 deletions

View File

@@ -2,5 +2,9 @@ class Post < ActiveRecord::Base
class Deletion < ActiveRecord::Base
set_table_name "deleted_posts"
end
def file_path
prefix = Rails.env == "test" ? "test." : ""
"#{Rails.root}/public/data/original/#{prefix}#{md5}.#{file_ext}"
end
end