Skip to content

Fix app helper autoloading in dev and isolate namespace#8180

Merged
javierjulio merged 9 commits into
masterfrom
rails-autoloading
Dec 24, 2023
Merged

Fix app helper autoloading in dev and isolate namespace#8180
javierjulio merged 9 commits into
masterfrom
rails-autoloading

Conversation

@javierjulio

@javierjulio javierjulio commented Dec 16, 2023

Copy link
Copy Markdown
Member

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
@codecov

codecov Bot commented Dec 16, 2023

Copy link
Copy Markdown

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
@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