From c84b94a647fb4c068e8be9d0495ff7284f41f168 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 17 Dec 2023 14:26:17 +0000 Subject: Initial --- app/models/application_record.rb | 3 +++ app/models/concerns/.keep | 0 app/models/event.rb | 4 ++++ 3 files changed, 7 insertions(+) create mode 100644 app/models/application_record.rb create mode 100644 app/models/concerns/.keep create mode 100644 app/models/event.rb (limited to 'app/models') diff --git a/app/models/application_record.rb b/app/models/application_record.rb new file mode 100644 index 0000000..b63caeb --- /dev/null +++ b/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + primary_abstract_class +end diff --git a/app/models/concerns/.keep b/app/models/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/app/models/event.rb b/app/models/event.rb new file mode 100644 index 0000000..1f722d3 --- /dev/null +++ b/app/models/event.rb @@ -0,0 +1,4 @@ +class Event < ApplicationRecord + validates :name, presence: true, length: { maximum: 50 } + validates :date, presence: true +end -- cgit v1.2.3