Forum: Ruby on Rails Graticule / acts_as_geocodable error?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ae87d1cf6f5b8f5ae2d42c3ac32caef2?d=identicon&s=25 Scott (Guest)
on 2009-05-01 17:16
(Received via mailing list)
Has anyone encountered this error using Graticule &
acts_as_geocodable?

ActiveRecord::UnknownAttributeError (unknown attribute: precision):
  (__DELEGATION__):2:in `__send__'
  (__DELEGATION__):2:in `with_scope'
  app/models/listing.rb:113:in `advanced_find'
  ...

Here is line 113 in listing.rb:

  published.find(:all,
    :origin => zip_code,
    :within => miles,
    :conditions => [conditions.join(" AND "), args, args],
    :page => {:size => 10, :current => (page || '')},
    :order => 'distance ASC')

The only mention of 'precision' is in my schema:

    t.decimal "latitude",    :precision => 15, :scale => 12
    t.decimal "longitude",   :precision => 15, :scale => 12

and when I render the distance coming back:

  Distance: <b><%= number_with_precision listing.distance,
    :precision => 1 %> miles away</b>

I can't figure out what "attribute" it's talking about.  Thanks for
the help.
This topic is locked and can not be replied to.