oauth_user.geozone_id = geozone.id if geozone.present?
oauth_user || User.new(
... existing code ...
)
Stage 2: extend the definition of geozone by adding list of postcodes to the geozone model and then something like
geozone = Geozone.find_by(postcode: oauth_postcode)
Describe the solution you'd like populate geozone_id in user model so that geozones can be implemented properly
Describe alternatives you've considered Stage 1: assign geozone from lacode
geozone = Geozone.find_by(external_code: oauth_lacode)
oauth_user.geozone_id = geozone.id if geozone.present?
oauth_user || User.new(
... existing code ...
)
Stage 2: extend the definition of geozone by adding list of postcodes to the geozone model and then something like geozone = Geozone.find_by(postcode: oauth_postcode)