]> source.dussan.org Git - redmine.git/commitdiff
replace RAILS_ROOT to Rails.root of attachments storage path.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 15 Jun 2011 23:39:37 +0000 (23:39 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 15 Jun 2011 23:39:37 +0000 (23:39 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6074 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/attachment.rb

index ff434d8f21363b2c789cd3c48c57f06f30ffc0d9..92eb9157a45ed742f17cadbb3ed5dcc8e2ac07fd 100644 (file)
@@ -43,7 +43,7 @@ class Attachment < ActiveRecord::Base
                                                         "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
 
   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
     if self.filesize > Setting.attachment_max_size.to_i.kilobytes