Calendar Klasse überarbeitet Views,gefixt, Pictures hinzugefügt

This commit is contained in:
Andreas Stephanides
2013-08-11 01:17:37 +02:00
parent 116446ff63
commit a5a02e065a
17 changed files with 238 additions and 67 deletions

View File

@@ -1,6 +1,13 @@
class Calentry < ActiveRecord::Base
attr_accessible :ende, :start, :summary, :typ,:calendar_ids
has_and_belongs_to_many :calendar
has_and_belongs_to_many :calendars
validates :start, :presence => true
validates :typ, :presence => true
validate do |entry|
if entry.ende.nil?
errors.add(:ende, "Es muss ein Endzeitpunkt vorhanden sein")
end
end
def start_time
start
end