Method: Geocoder::ModelMethods#geocoded_by
- Defined in:
- lib/geocoder/railtie.rb
#geocoded_by(address_attr, options = {}, &block) ⇒ Object
Set attribute names and include the Geocoder module.
33 34 35 36 37 38 39 40 41 |
# File 'lib/geocoder/railtie.rb', line 33 def geocoded_by(address_attr, = {}, &block) geocoder_init( :geocode => true, :user_address => address_attr, :latitude => [:latitude] || :latitude, :longitude => [:longitude] || :longitude, :geocode_block => block ) end |