Method: ActiveShipping::UPS#within_same_area?
- Defined in:
- lib/active_shipping/carriers/ups.rb
#within_same_area?(origin, location) ⇒ Boolean (protected)
1145 1146 1147 1148 1149 1150 |
# File 'lib/active_shipping/carriers/ups.rb', line 1145 def within_same_area?(origin, location) return false unless location matching_country_codes = origin.country_code(:alpha2) == location.country_code(:alpha2) matching_or_blank_city = location.city.blank? || location.city == origin.city matching_country_codes && matching_or_blank_city end |