forked from bofh/fetsite
Calendar Klasse überarbeitet Views,gefixt, Pictures hinzugefügt
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user