aligns document verification with census API
This commit is contained in:
@@ -32,7 +32,7 @@ class Verification::Management::Document
|
||||
end
|
||||
|
||||
def under_sixteen?(response)
|
||||
16.years.ago < string_to_date(response.date_of_birth)
|
||||
16.years.ago < response.date_of_birth
|
||||
end
|
||||
|
||||
def verified?
|
||||
|
||||
@@ -13,9 +13,4 @@ module ActiveModel::Dates
|
||||
attrs.except("#{field}(1i)", "#{field}(2i)", "#{field}(3i)")
|
||||
end
|
||||
|
||||
def string_to_date(value)
|
||||
day, month, year = value.split("-")
|
||||
Date.new(year.to_i, month.to_i, day.to_i)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user