meeting style

This commit is contained in:
Andreas Stephanides
2015-03-15 13:09:05 +01:00
parent 3cc9de7d29
commit 34c0374877
11 changed files with 55 additions and 24 deletions

View File

@@ -1,12 +1,15 @@
class Meetingtyp < ActiveRecord::Base
attr_accessible :agendaintern, :desc, :name, :protocolintern, :rubrik_id
attr_accessible :agendaintern, :desc, :name, :protocolintern, :rubrik_id, :picture
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
mount_uploader :picture, PictureUploader
def text
self.name
end
end