Module: VAProfile::Concerns::Expirable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Models::BaseAddress, Models::Email, Models::Permission, Models::Telephone, Models::V3::BaseAddress
- Defined in:
- lib/va_profile/concerns/expirable.rb
Instance Method Summary collapse
-
#effective_end_date_has_passed ⇒ VAProfile::Models::Base
private
Raises validation error if the model’s effective_end_date is past.
Instance Method Details
#effective_end_date_has_passed ⇒ VAProfile::Models::Base (private)
Raises validation error if the model’s effective_end_date is past
19 20 21 22 23 |
# File 'lib/va_profile/concerns/expirable.rb', line 19 def effective_end_date_has_passed if effective_end_date.present? && (effective_end_date > Time.zone.now) errors.add(:effective_end_date, 'must be in the past') end end |