dependent and calendar

This commit is contained in:
Andreas Stephanides
2015-06-11 15:47:26 +02:00
parent 2f1a63931c
commit 12a82f519c
4 changed files with 42 additions and 36 deletions

View File

@@ -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