This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
Signatures not generated for models using new ActiveRecord::DelegatedType #424
Labels
bug
Something isn't working
Describe the bug:
When using the new DelegatedType feature in Rails 6.1 there are not signatures generated for delegated types from a base class, causing errors since it can't detect that the method is available.
Steps to reproduce:
Follow the steps as outlined in the Rails documentation to create a delegated type, for instance let's say
Item
is the base class andBook
is the delegated type. Then runbundle exec rake rails_rbi:models
to generate everything normally.From there, in a controller write
Item.books
(which will run fine) and it will report "Method books does not exist on T.class_of(Item)" when checking level is more thanfalse
.Expected behavior:
I would expect definitions to be read in this and be generated so that an array of Book would be expected to respond.
Versions:
The text was updated successfully, but these errors were encountered: