Solved (sort of).  I dug around until I 
found  Here's what 
I did for a workaround:

class WeatherStation
  include DataMapper::Resource

  # property <name>, <type>
  property :id, Serial
  property :callsign, String
  property :lat, Decimal, :precision => 9, :scale => 6
  property :lng, Decimal, :precision => 9, :scale => 6

  def self.process_station(callsign, lat, lng)
    # workaround for
    lat1 = BigDecimal(lat.to_f.round(6).to_s)
    lng1 = BigDecimal(lng.to_f.round(6).to_s)
    WeatherStation.first_or_create({:callsign => callsign}, 
                                   {:lat => lat1, :lng => lng1})

You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to