This commit is contained in:
2014-07-30 10:15:40 +05:30
committed by Andreas Stephanides
parent 2b562fd7e0
commit 7d56d10431
35 changed files with 429 additions and 12 deletions

View File

@@ -16,7 +16,7 @@ class Beispiel < ActiveRecord::Base
attr_accessible :desc, :name, :lva_id, :beispieldatei, :beispieldatei_cache, :datum
acts_as_votable
belongs_to :lva
include IsCommentable
mount_uploader :beispieldatei, AttachmentUploader
validates :beispieldatei, :presence => true
validates :name, :presence => true
@@ -35,4 +35,7 @@ class Beispiel < ActiveRecord::Base
"delete_type" => "DELETE"
}
end
def divid
"beispiel_"+id.to_s
end
end