aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/event.rb
blob: 9dea7b87fd05d437e77d704cddf41f308f618c45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
class Event < ApplicationRecord
  validates :name, presence: true, length: { maximum: 50 }
  validates :date, presence: true

  def month_year_check(year,  month)
    if self.date.year == year && self.date.month == month
      true
    else
      false
    end
  end
end