Sha256: bebf05d772bf74b98d044d755ff04107fc95271867016572502daa540cd4a47c

Contents?: true

Size: 571 Bytes

Versions: 5

Compression:

Stored size: 571 Bytes

Contents

require 'rubygems'
require 'test/unit'

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

Mongoid.configure do |config|
  config.logger = Logger.new($stderr, :debug)
end

##
# Geocoded model.
#
class Place
  include Mongoid::Document
  include Geocoder::Model::Mongoid

  geocoded_by :address, :coordinates => :location
  field :name
  field :address
  field :location, :type => Array

  def initialize(name, address)
    super()
    write_attribute :name, name
    write_attribute :address, address
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
geocoder-1.1.1 test/mongoid_test_helper.rb
geocoder-1.1.0 test/mongoid_test_helper.rb
geocoder-1.0.5 test/mongoid_test_helper.rb
geocoder-1.0.4 test/mongoid_test_helper.rb
geocoder-1.0.3 test/mongoid_test_helper.rb