You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it doesn't, so you need to explicitly put to_a into your obj_extract paths, to turn it into an array.
One way to accomplish this would be to treat anything that respond_to?(:to_ary) as an array, rather than hard-coding ActiveRecord::Associations::CollectionProxy. Note that's to_ary not to_a, and thus should work fine, only things that really are meant to be interchangeable with Array should have to_ary.
I think this is a definite improvement... but ti's a backward incompatibility, since anything doing an explicit to_a will break.
Could be done with an obj_extract2 or something to be backwards compat. I dunno.
The text was updated successfully, but these errors were encountered:
Right now it doesn't, so you need to explicitly put
to_a
into yourobj_extract
paths, to turn it into an array.One way to accomplish this would be to treat anything that
respond_to?(:to_ary)
as an array, rather than hard-codingActiveRecord::Associations::CollectionProxy
. Note that'sto_ary
notto_a
, and thus should work fine, only things that really are meant to be interchangeable with Array should haveto_ary
.I think this is a definite improvement... but ti's a backward incompatibility, since anything doing an explicit
to_a
will break.Could be done with an
obj_extract2
or something to be backwards compat. I dunno.The text was updated successfully, but these errors were encountered: