Residence Verification now fills up the date of birth and genre

This commit is contained in:
kikito
2016-04-12 13:38:39 +02:00
parent 6229097032
commit 2c51115d6d
2 changed files with 16 additions and 1 deletions

View File

@@ -31,6 +31,8 @@ class Verification::Residence
user.update(document_number: document_number,
document_type: document_type,
geozone: self.geozone,
date_of_birth: date_of_birth.to_datetime,
genre: genre,
residence_verified_at: Time.now)
end
@@ -75,6 +77,15 @@ class Verification::Residence
@census_api_response.district_code
end
def genre
case @census_api_response.genre
when "Varón"
"male"
when "Mujer"
"female"
end
end
private
def call_census_api