Sha256: 1510fcf8c648b3885415c71786575e2c92fac3a86b831f48754c249e84aa5df4
Contents?: true
Size: 369 Bytes
Versions: 10
Compression:
Stored size: 369 Bytes
Contents
module Gaku class SchoolYear < ActiveRecord::Base has_many :semesters validates :starting, :ending, presence: true validate :ending_after_starting private def ending_after_starting return if starting.blank? && ending.blank? errors.add(:base, I18n.t(:'school_year.ending_after_starting')) if starting >= ending end end end
Version data entries
10 entries across 10 versions & 2 rubygems