uses Date#age_in_years when calculating ages

This commit is contained in:
kikito
2017-02-03 12:56:40 +01:00
parent 3535cfc0d6
commit 95f80651b1
4 changed files with 4 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ class Verification::Management::Document
end
def under_age?(response)
User.minimum_required_age.years.ago.beginning_of_day < response.date_of_birth.beginning_of_day
response.date_of_birth && User.minimum_required_age < response.date_of_birth.age_in_years
end
def verified?