Moves Age calculation to a module instead of monkeypatching Date
This commit is contained in:
@@ -68,7 +68,7 @@ class Officing::Residence
|
||||
end
|
||||
|
||||
def allowed_age?
|
||||
date_of_birth.age_in_years <= User.minimum_required_age
|
||||
Age.in_years(date_of_birth) <= User.minimum_required_age
|
||||
end
|
||||
|
||||
def geozone
|
||||
|
||||
Reference in New Issue
Block a user