Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app helper autoloading in dev and isolate namespace #8180

Merged
merged 9 commits into from
Dec 24, 2023

Conversation

javierjulio
Copy link
Member

@javierjulio javierjulio commented Dec 16, 2023

This incorporates the changes from #3927 that when testing locally with the helper bug reproductions it resolves the autoloading issue. I think this has to be used with isolate_namespace ActiveAdmin in the engine file for this to be a safe change. With the namespace isolation in place, I encounter an error though when loading the login form page where the URL helpers don't seem to be accessible from the sessions new template. The admin pages work fine.

@javierjulio javierjulio self-assigned this Dec 16, 2023
Copy link

codecov bot commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e630e6) 99.04% compared to head (ce9cbc3) 99.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8180      +/-   ##
==========================================
- Coverage   99.04%   99.04%   -0.01%     
==========================================
  Files         152      152              
  Lines        4184     4173      -11     
==========================================
- Hits         4144     4133      -11     
  Misses         40       40              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

With the base, page and resource controllers migrated to app folder for autoloading and fixing helper bug changes not reloading in the host app, I think this has to be used with `isolate_namespace ActiveAdmin` in the engine file for this to be a safe change. With the namespace isolation in place, I encounter an error though when loading the login form page where the URL helpers don't seem to be accessible from the sessions new template. The admin pages work fine.
Now with isolate_namespace being used, these helpers will fail unless we specify main_app proxy per the Rails Engines guide.
This also changed with the isolate_namespace usage.
@javierjulio javierjulio merged commit ef86028 into master Dec 24, 2023
30 checks passed
@javierjulio javierjulio deleted the rails-autoloading branch December 24, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant