Closed craibuc closed 3 years ago
The plugin hasn't been updated for Rails3. Frankly I'm surprised you got the query to work (with the old syntax) on Rails3.
I've noodled around a little bit with the Rails3 chainable scopes for the plugin, but nothing to show for it.
Lucky, I'd guess.
I would offer my help, but I'm too new to Rails to be of much value.
Any ideas on when your plugin will be update for R3?
Thanks for the work you've done so far, BTW.
Any ideas on when your plugin will be update for R3?
I'm not personally going to be able to tackle it anytime soon. Would love to see something in the community take it on.
do you have any ideas on what needs to change? how much work is involved? something a novice could tackle?
Has anyone tried this one for Rails 3?
https://github.com/jlecour/geokit-rails
https://rubygems.org/gems/geokit-rails3
It will be a bit before I can upgrade to Rails 3 but would love to hear if anyone out in the wild is finding jlecour's version works.
This works for me in Rails 3 and the 'geokit-rails3' gem:
@users = User.valid.joins(:profile).includes(:profile). geo_scope(:origin => ll, :within => distance). order(order_by). paginate(:per_page => @per_page, :page => params[:page])
Cool, I'm totally going to try it too then in a few weeks when I can move my app to Rails 3. Thanks for checking it out and hope it continues to work for you.
Closing this as there have been significant updates since.
I'm trying to migrate to Rails3 syntax. The following query works:
If I convert this query to Rails3 syntax using scopes, the query resembles: @users = User.valid.joins(:profile).includes(:profile).order(order_by).paginate(:per_page => @per_page, :page => params[:page])
Question: how do I reference the :units and :origin in this syntax? I've tried a variation of the Rails3 syntax to use scopes and the .find method:
but I get an error that reads "Unknown key(s): origin, units".
Is the plugin Rails3 compatible?