Interface Neuigkeiten & Attachment

This commit is contained in:
2014-08-11 14:38:14 +05:30
parent 3347ac89d9
commit af9da058ab
13 changed files with 111 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