tapioca icon indicating copy to clipboard operation
tapioca copied to clipboard

Fix return type of ActiveRecord::QueryMethods#extract_associated

Open bdewater opened this issue 1 year ago • 3 comments

Motivation

See https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-extract_associated - this returns an array and the return type unknown since it depends on the association passed in.

Implementation

Override when iterating over QUERY_METHODS to return the right thing seemed like the right place to hook into since it collects methods from the aforementioned Active Record module.

Tests

Updated tests.

bdewater avatar Mar 15 '24 14:03 bdewater

CI is failing on unrelated protobuf errors.

bdewater avatar Mar 15 '24 18:03 bdewater

@bdewater can you rebase on latest main?

KaanOzkan avatar Mar 21 '24 14:03 KaanOzkan

@KaanOzkan CI is green now :)

bdewater avatar Mar 22 '24 20:03 bdewater