Instantly share code, notes, and snippets.

Embed
What would you like to do?
def validate
# elided
errors.add(:assessed_on, "must be in the past") if assessed_on and assessed_on > Date.today
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment