replace RAILS_ROOT to Rails.root of attachments storage path.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6074 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-06-15 23:39:37 +00:00
parent 115d227298
commit 5500defd0d
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class Attachment < ActiveRecord::Base
"LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"} "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
cattr_accessor :storage_path cattr_accessor :storage_path
@@storage_path = Redmine::Configuration['attachments_storage_path'] || "#{RAILS_ROOT}/files" @@storage_path = Redmine::Configuration['attachments_storage_path'] || "#{Rails.root}/files"
def validate def validate
if self.filesize > Setting.attachment_max_size.to_i.kilobytes if self.filesize > Setting.attachment_max_size.to_i.kilobytes