Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweaked full_filename to return nil on nil filenames

  • Loading branch information...
commit 5c222f7801c90f370f27ea4cee5bfdce3cfbfc07 1 parent 2ea4447
Daniel Tenner authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/num_fu.rb
View
3  lib/num_fu.rb
@@ -71,6 +71,7 @@ def delete_file
end
def full_filename
+ return nil if filename.nil?
file_system_path = self.attachment_options[:path_prefix].to_s
File.expand_path(File.join(RAILS_ROOT, file_system_path, *partitioned_path(filename)))
end
@@ -116,4 +117,4 @@ class FakeUploadData
attr_accessor :filename, :content_type, :path, :original_filename, :size
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.