https://avo.cool logo
I have openned Avo 2 PR to fix the RubyGems.org...
# avo-2
s
I have openned Avo 2 PR to fix the RubyGems.org problem. https://github.com/avo-hq/avo/pull/2927 is it worth to open other PRs to onboard latest Rails and Rubies to CI?
m
Thread automatically created by retro♐ in #740893011994738751
l
we started testing Avo 3 against Rails
main
a few weeks back so we should be good there.
we also did a refactor as the
_reflections
before would have stringified keys, and now are symbols (as I remember)
but I don't know exactly what are the differences between
_reflections
and `class.reflections
s
_reflections
is private API
class.reflections
populates
@__reflections
(notice two underscores)
TBH IMHO you should use
reflect_on_association(name)
since you're not enumerating thru reflections, but looking for reflection by name
@lemon-wall-20836 wdyt? ^
l
sorry @retro. I got distracted
I think I tried
reflect_on_association
once and I found that it does not contain all the associations or something
let me check
I would love to be able to use that TBH
I agree that we shouldn't use the private API
s
Do you remember what was missing?
l
I can't remember exactyl, but some associations
I think I was strapped for time and the moment I noticed that some association was missing, I reverted everything and pushed the PR
if you'd like to get that commit and try again, I'll definitely have another look and try to merge that
my eyes lit up as well when I found that method. I knew that that was what we needed to use
s
There are 2 types of reflections. Associations (has_many, has_one, belongs, ...) and Aggregated (composed_of) ones. IMHO you're looking only for associations.
l
hmm... never heard of the
composed_of
word
... in a Rails context
I don't think we use those in the dummy app (where the tests were failing)
s
it is relatively new feature
l
we don't use it
s
clear, ok I'll try to update and see if tests will fail
l
we have some flaky ones that are a bit nasty but we should be green on
main