Iam using geokit-rails (http://github.com/jlecour/geokit-rails branch gem). I like to build a scope like
a = MyModel.scoped
a = a.limit(10).scoped
a = a.find_within(10,:origin => [mylat,mylng]).scoped
a = a.where(:visible => true)
a = a.paginate(:page => @params[:page], :per_page => 20)
But this does't work - after find the query will fired. The scopes .origin and .within (described in the documentation of geokit-rails) don't work.
In rails2 I'd used rayn bates scope_builder and this do work until the update on rails3. Cause I'm not such a advanced programmer I'm not able do implement my own scope into geokit-rails.
Does anyone have a idea how i prevent ActiveRecord to fire the query on the find_within method? Thanks