Interface Neuigkeiten & Attachment

This commit is contained in:
2014-08-11 14:38:14 +05:30
committed by Andreas Stephanides
parent ed5b2b8685
commit 2b562fd7e0
12 changed files with 110 additions and 44 deletions

View File

@@ -89,8 +89,11 @@ end
# def filename
# "something.jpg" if original_filename
# end
protected
def image?(file)
%w(jpg png jpeg).include?(File.extname(full_filename(file)))
def extention
File.extname(full_filename(file.file)).downcase
end
def image?(for_file)
%w(.jpg .png .jpeg).include?(File.extname(full_filename(for_file.file)).downcase)
end
end