Fixed: TypeError in WikiController#destroy_attachment (#1281).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1444 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
82c12d09e9
commit
e02e047dd4
|
@ -68,9 +68,7 @@ class Attachment < ActiveRecord::Base
|
||||||
|
|
||||||
# Deletes file on the disk
|
# Deletes file on the disk
|
||||||
def after_destroy
|
def after_destroy
|
||||||
if self.filename?
|
File.delete(diskfile) if !filename.blank? && File.exist?(diskfile)
|
||||||
File.delete(diskfile) if File.exist?(diskfile)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns file's location on disk
|
# Returns file's location on disk
|
||||||
|
|
Loading…
Reference in New Issue