attachments has_many for document, neuigkeit, thema

This commit is contained in:
Andreas Stephanides
2015-04-07 23:23:14 +02:00
parent 04b6bcac8a
commit 080150f11b
4 changed files with 6 additions and 1 deletions

View File

@@ -20,6 +20,9 @@ class Neuigkeit < ActiveRecord::Base
has_many :calentries, as: :object
has_many :nlinks
has_one :meeting
has_many :attachments, :as=>:parent
validates :rubrik, :presence=>true
validates :author, :presence=>true