Module: Spree::Address::Geocoding

Extended by:
ActiveSupport::Concern
Included in:
Spree::Address
Defined in:
app/models/concerns/spree/address/geocoding.rb

Overview

Adds geocoding methods to Spree::Address

Instance Method Summary collapse

Instance Method Details

#full_addressString

The full address.

Examples:

Get the full address.

address.full_name # "street, city, state, country"

Returns:

  • (String)

    The full street address wit city, state and country.



26
27
28
# File 'app/models/concerns/spree/address/geocoding.rb', line 26

def full_address
  [address1, address2.presence, city, state_text, country.try(:iso)].compact.join(', ')
end