Attempting to access arrays of associated objects that are created with has_many :through relationships always seem to return an empty array in awesome_print 1.8.0.
I was experiencing the issue specifically when using a Rails 5.0 accessor that is created thru reflection via a has_many through: relationship which is supposed to return an array of associated objects.
Attempting to access arrays of associated objects that are created with has_many :through relationships always seem to return an empty array in awesome_print
1.8.0
.I was experiencing the issue specifically when using a Rails 5.0 accessor that is created thru reflection via a
has_many through:
relationship which is supposed to return an array of associated objects.It appears that this was broken in this commit https://github.com/awesome-print/awesome_print/commit/04141b3cf586828494e352aa000d0bc321b5d7d1, and to be fair, it looks like @waldyr may have been misled by this typo https://github.com/rails/rails/commit/68d35960f336d5be3c5e35c88e6c8bdebcbcf500 😁
Downgrading to
'awesome_print', '1.7.0'
temporarily resolves this incompatibility issue. I've submitted https://github.com/awesome-print/awesome_print/pull/332 to have it patched in1.8.0
and above.Example Models
Console Results