Issue using eager_load in external gem
aviemet opened this issue · comments
After upgrading to 1.12.1, a gem I wrote is now throwing an error when it runs. I'm not sure if this is something which might effect others, or if it's a sub-optimal implementation on my part.
In my gem, I use Rails.application.eager_load!
so that I can load all ActiveRecord models and do some inspection. With the latest version, that throws the following error:
undefined method 'helper' for ActionController::API:Class
Which traces back to this line on the Controller module in InertiaRails.
I've been searching for a better way to eager load models, but I can't seem to find one. Would appreciate some guidance.
Just tagged Inertia v2.0. Please take a look and see if this resolves your issues!
Feel free to re-open if it does not.