ruby on rails 3 - scoped and find_within -
iam using geokit-rails (http://github.com/jlecour/geokit-rails branch gem). build scope like
a = mymodel.scoped = a.limit(10).scoped = a.find_within(10,:origin => [mylat,mylng]).scoped = a.where(:visible => true) = a.paginate(:page => @params[:page], :per_page => 20)
but does't work - after find query fired. scopes .origin , .within (described in documentation of geokit-rails) don't work.
in rails2 i'd used rayn bates scope_builder , work until update on rails3. cause i'm not such advanced programmer i'm not able implement own scope geokit-rails.
does have idea how prevent activerecord fire query on find_within method? thanks
ok solution here: http://github.com/olli/geokit-rails/commit/7df7316870045def9eaaf640d4a068853c8d1962 have fun :)
Comments
Post a Comment