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
I was getting super weird errors about missing helper methods today after upgrading to 0.9.4 with my Rails 5.2.x app and after tons of fruitless debugging I finally found out that probably due to some autoloading issues Trestle::AdminController was extending ApplicationController (of my app) instead of Trestle::ApplicationController and thus missing all the helpers etc.
I was able to fix by either inheriting from ::Trestle::ApplicationController (by patching my local Trestle install) or trying to trick the loader into loading Trestle::ApplicationController in the initializer in the hopes it loads before ApplicationController.
I'm totally not sure what the correct solution here is but seeing @spohlenz had already various collisions with autoloading in past issues, I hope there's a solution that will work with 5.2.x as well? (We're not too far away from upgrading but there are 1-2 deps that keep us from doing that right now...)
I'm not sure how easy it would be to create a minimal repro app, but if you want me to try, I will.
The text was updated successfully, but these errors were encountered:
I was getting super weird errors about missing helper methods today after upgrading to 0.9.4 with my Rails 5.2.x app and after tons of fruitless debugging I finally found out that probably due to some autoloading issues
Trestle::AdminController
was extendingApplicationController
(of my app) instead ofTrestle::ApplicationController
and thus missing all the helpers etc.I was able to fix by either inheriting from
::Trestle::ApplicationController
(by patching my local Trestle install) or trying to trick the loader into loadingTrestle::ApplicationController
in the initializer in the hopes it loads before ApplicationController.I'm totally not sure what the correct solution here is but seeing @spohlenz had already various collisions with autoloading in past issues, I hope there's a solution that will work with 5.2.x as well? (We're not too far away from upgrading but there are 1-2 deps that keep us from doing that right now...)
I'm not sure how easy it would be to create a minimal repro app, but if you want me to try, I will.
The text was updated successfully, but these errors were encountered: