AutoCommit Mon Aug 31 17:03:03 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-31 17:03:03 +02:00
parent 93dbdedf53
commit 589597509a
4 changed files with 36 additions and 16 deletions

View File

@@ -32,13 +32,13 @@ class Fetprofile < ActiveRecord::Base
has_many :nlinks, as: :link
def validate_birthday
unless birth_month.nil? || birth_day.nil?
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
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
else
v= false
end