diff --git a/app/models/attachment.rb b/app/models/attachment.rb index ff434d8f2..92eb9157a 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -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