nettere Kalendereinttragsbearbeitung

This commit is contained in:
Andreas Stephanides
2013-11-13 11:05:04 +01:00
parent d1ae7b7da5
commit 75083064d7
7 changed files with 73 additions and 39 deletions

View File

@@ -15,8 +15,9 @@
class Calentry < ActiveRecord::Base
attr_accessible :ende, :start, :summary, :typ,:calendar_ids, :calendar, :dauer
belongs_to :calendar
belongs_to :neuigkeit
#belongs_to :neuigkeit
validates :start, :presence => true
validates :object, :presence => true
validates :typ, :presence => true
before_save :get_public
belongs_to :object, polymorphic: true # Objekt zu dem der Calentry gehört (derzeit ein Newsartikel)