forked from bofh/fetsite
dependent and calendar
This commit is contained in:
@@ -7,7 +7,7 @@ class Meeting < ActiveRecord::Base
|
||||
belongs_to :neuigkeit, touch: true
|
||||
has_one :protocol, :class_name=>'Document', :conditions=>{:typ=>10}, :as=>:parent
|
||||
has_one :agenda , :as=>:parent,:conditions=>{:typ=>11}, :class_name=>'Document'
|
||||
has_one :calentry, as: :object
|
||||
has_one :calentry, as: :object, :dependent=> :destroy
|
||||
has_one :calendar, :through=>:meetingtyp
|
||||
has_one :rubrik, :through=>:meetingtyp
|
||||
scope :upcomming, includes(:calentry).where("calentries.start>?",1.hour.ago)
|
||||
|
||||
@@ -17,8 +17,8 @@ class Neuigkeit < ActiveRecord::Base
|
||||
belongs_to :author, :class_name =>'User'
|
||||
belongs_to :rubrik, :class_name =>'Rubrik', :foreign_key => "rubrik_id"
|
||||
has_one :calendar, through: :rubrik
|
||||
has_many :calentries, as: :object
|
||||
has_many :nlinks
|
||||
has_many :calentries, as: :object, :dependent=> :destroy
|
||||
has_many :nlinks, :dependent=> :destroy
|
||||
has_one :meeting
|
||||
has_many :attachments, :as=>:parent
|
||||
|
||||
|
||||
Reference in New Issue
Block a user