aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/application_record.rb3
-rw-r--r--app/models/concerns/.keep0
-rw-r--r--app/models/event.rb4
3 files changed, 7 insertions, 0 deletions
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
--- /dev/null
+++ b/app/models/concerns/.keep
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