aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/event.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index 9dea7b8..aaa4e6e 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -2,6 +2,8 @@ class Event < ApplicationRecord
validates :name, presence: true, length: { maximum: 50 }
validates :date, presence: true
+ belongs_to :organisation, optional: true
+
def month_year_check(year, month)
if self.date.year == year && self.date.month == month
true