Commit c0503d2b by gmarik

removes duplication

parent 8e900b2a
...@@ -46,15 +46,13 @@ module Paperclip ...@@ -46,15 +46,13 @@ module Paperclip
def empty_file? def empty_file?
File.exists?(@filename) && File.size(@filename) == 0 File.exists?(@filename) && File.size(@filename) == 0
end end
alias :empty? :empty_file?
def blank_name? def blank_name?
@filename.nil? || @filename.empty? @filename.nil? || @filename.empty?
end end
def empty?
File.exists?(@filename) && File.size(@filename) == 0
end
def possible_types def possible_types
MIME::Types.type_for(@filename).collect(&:content_type) MIME::Types.type_for(@filename).collect(&:content_type)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment