Method: Locale#geocoding_address

Defined in:
app/models/locale.rb

#geocoding_addressObject

Returns this locale’s address for geocoding.



80
81
82
83
84
85
86
87
88
89
# File 'app/models/locale.rb', line 80

def geocoding_address
  a = case self.kind
    when 'country' then self.name
    when 'state' then self.name
    when 'city' then [self.name, self.parent.name]
    when 'location' then nil
  end

  a && a.select{|s| ! s.blank?} * ' '
end