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

@@ -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),