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

@@ -18,6 +18,13 @@ class Attachment < ActiveRecord::Base
validates :thema, :presence => true
validates :name, :presence => true
def image?
# data_ext = datei.file.extension.downcase
# %w(jpg png jpeg).include?(data_ext)
datei.image?(datei.file)
end
def to_jq_upload
{
"id" => read_attribute(:id),