aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/calendar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/calendar.rb')
-rw-r--r--app/models/calendar.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/calendar.rb b/app/models/calendar.rb
index 84b569ab4..39e2b2cff 100644
--- a/app/models/calendar.rb
+++ b/app/models/calendar.rb
@@ -2,18 +2,17 @@ require 'range_ext'
require_relative 'calendar/date_value'
require_relative 'calendar/period'
-class Calendar < ActiveRecord::Base
+class Calendar < ApplicationModel
include DateSupport
include PeriodSupport
include ApplicationDaysSupport
include TimetableSupport
- has_paper_trail class_name: 'PublicVersion'
+ has_metadata
belongs_to :organisation
belongs_to :workgroup
- validates_presence_of :name, :short_name, :organisation, :workgroup
- validates_uniqueness_of :short_name
+ validates_presence_of :name, :organisation, :workgroup
has_many :time_tables