New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
before_validation_on_create removed in Rails 3 #16
Comments
Calling just |
Yes, if you're using the autogeocode option, you'll hit the geocoding we service every time you save the instance. Which will make things very slow. The plugin is going to have a lot of other issues with Rails3. There will be problems in the way we munge SQL for the distance clauses. I played around with Rails3 some this evening and there are still a lot of failing tests. |
For the distance clause issues, I got things working by adding merge_conditions from the Rails 2 ActiveRecord::Base into acts_as_mappable.rb. It's a temporary fix until the queries are switched to the new query api. |
That's working? Interesting -- I tried that and still had issues. Awesome if that's all it takes though. |
It worked for a very specific instance and then when I tried to do something a little more complex I got the Unknown key(s): origin, within error that is mentioned here: http://www.railsplugins.org/plugins/124-geokit-rails |
Changing the plugin code from |
This change appears to have been implemented. Closing as fixed. |
Rails 3 is giving me a "no method found" error when I enable auto_geocode.
The validation should be called like so:
before_validation :auto_geocode_address, :on => :create
because
before_validation_on_create
has been deprecated.Although when I change the callback to that code WEBrick crashes so there's more to the bug.
Running Rails 3 Beta 2 with ruby 1.9.2
The text was updated successfully, but these errors were encountered: