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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to