From c6574cee000ad3897c6820b9893ede2f462b14a6 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 21 Apr 2015 17:17:01 +0200 Subject: [PATCH] fetprofile validated date --- app/models/fetprofile.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/fetprofile.rb b/app/models/fetprofile.rb index efbf04a..804995e 100644 --- a/app/models/fetprofile.rb +++ b/app/models/fetprofile.rb @@ -35,8 +35,14 @@ class Fetprofile < ActiveRecord::Base unless Date.valid_date?((birth_year.nil?) ? Date.today.year : birth_year, birth_month, birth_day) errors.add(:birth_month, "Invalides Datum") errors.add(:birth_day, "Invalides Datum") + v= false + else + v= true end -end + else + v= false + end + v end def title