diff options
-rw-r--r-- | app/models/event.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index 27f9aec..3f6881c 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -4,8 +4,8 @@ class Event < ApplicationRecord belongs_to :operation, optional: true - def month_year_check(year, month) - if self.date.year == year && self.date.month == month + def month_year_check(year, month) + if date.year == year && date.month == month true else false |