meetingtyp management

This commit is contained in:
Andreas Stephanides
2015-02-09 15:38:21 +01:00
parent 6c39c40403
commit f1a149908d
15 changed files with 148 additions and 17 deletions

View File

@@ -1,7 +1,12 @@
class Meetingtyp < ActiveRecord::Base
attr_accessible :agendaintern, :desc, :name, :protocolintern
attr_accessible :agendaintern, :desc, :name, :protocolintern, :rubrik_id
belongs_to :rubrik
validate :rubrik, :presence=>true
has_many :meetings
has_one :calendar, through: :rubrik
has_one :protocol, :class_name=>'Document', :conditions=>{:typ=>10}, :as=>:parent
has_one :agenda , :as=>:parent, :conditions=>{:typ=>11}, :class_name=>'Document'
def text
self.name
end
end