geokit / geokit-rails

Official Geokit plugin for Rails/ActiveRecord. Provides location-based goodness for your Rails app. Requires the Geokit gem.
MIT License
1.57k stars 245 forks source link

Error with Rails 4 and auto_geocode param : undefined method 'before_validation_on_create' #43

Closed camilleroux closed 11 years ago

camilleroux commented 11 years ago

When I use the "auto_geocode" params of the acts_as_mappable method, I get the following error :

./.rvm/gems/ruby-1.9.3-p194/gems/activerecord-4.0.0/lib/active_record/dynamic_matchers.rb:22:in 'method_missing' : undefined method 'before_validation_on_create' for #<Class:0x007fcc7a24dc38> (NoMethodError)
from ./.rvm/gems/ruby-1.9.3-p194/gems/geokit-rails-1.1.4/lib/geokit-rails/acts_as_mappable.rb:91:in `acts_as_mappable'
mnoack commented 11 years ago

Geokit-rails 1.1.4 is quite old. We've been holding out on releasing geokit-rails 2.0.0 as there were some big changes. Since rails 4 is now passing our tests we've released the gem.

This particular issue was fixed back in 9c54d8a95f6707596779da65cd6c92a9c965c13c