modify attachments

This commit is contained in:
Andreas Stephanides
2015-02-11 20:53:25 +01:00
parent 5439d33a3c
commit 29a35f76d8
9 changed files with 52 additions and 17 deletions

View File

@@ -22,6 +22,7 @@ include Rails.application.routes.url_helpers
validates :themengruppe, :presence => true
validates :title, :presence => true
validates :text, :presence => true
has_many :titlepics, :as=>:parent, :class_name=>'Attachment', :conditions=>{:flag_titlepic=>true}
has_many :meetings, :as=>:parent
has_many :documents, :as=>:parent
scope :public, where(:isdraft=>false).includes(:themengruppe).where("themengruppen.public"=>true)