ankane / neighbor

Nearest neighbor search for Rails
MIT License
589 stars 14 forks source link

Update scope to make it compatible with Rails 6.1 + Ruby 3.2 #13

Closed pcreux closed 1 year ago

pcreux commented 1 year ago

The scope scope :nearest_neighbors, ->(attribute_name, vector = nil, distance:) { is breaking on Rails 6.1 with Ruby 3.2 with error:

ArgumentError: wrong number of arguments (given 0, expected 1..2; required keyword: distance)

This seems to be related to https://github.com/rails/rails/issues/46934.

I don't know if you want to support this so I'm closing this PR for now. Further updates in: https://github.com/retailzipline/neighbor/pull/1

pcreux commented 1 year ago

I re-opened this PR: https://github.com/ankane/neighbor/pull/14