add jrails, work on comments

This commit is contained in:
albert
2010-10-21 18:56:00 -04:00
parent f8b1bd3142
commit a9da0f1059
38 changed files with 20481 additions and 7 deletions

View File

@@ -44,11 +44,19 @@ class Post < ActiveRecord::Base
end
def medium_file_path
"#{Rails.root}/public/data/medium/#{file_path_prefix}#{md5}.jpg"
if has_medium?
"#{Rails.root}/public/data/medium/#{file_path_prefix}#{md5}.jpg"
else
file_path
end
end
def large_file_path
"#{Rails.root}/public/data/large/#{file_path_prefix}#{md5}.jpg"
if has_large?
"#{Rails.root}/public/data/large/#{file_path_prefix}#{md5}.jpg"
else
file_path
end
end
def preview_file_path