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 rails constants warning #634

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sbernhard
Copy link
Contributor

This fixes:
lib/foreman_discovery/engine.rb:302: warning: already initialized constant ForemanDiscovery::Engine::MANAGER lib/foreman_discovery/engine.rb:271: warning: previous definition of MANAGER was here

This fixes:
lib/foreman_discovery/engine.rb:302: warning: already initialized constant ForemanDiscovery::Engine::MANAGER
lib/foreman_discovery/engine.rb:271: warning: previous definition of MANAGER was here
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct and the actual fix is the app.reloader.to_prepare changes in 7bc87fb#diff-4b654d6bf0704dbe13565638885158149d062fb4cffe86d2b57d290450f1ee9bR25. @ofedoren do you agree?

@ofedoren
Copy link
Member

ofedoren commented Dec 6, 2024

@ofedoren do you agree?

I guess? If it were me I would get rid of those constants unless they are used somewhere else. Even though REX plugin does the same thing and it already has app.reloader.to_prepare, so it works, I'd remove them. There is no much point to use constants here...

@ekohl
Copy link
Member

ekohl commented Dec 6, 2024

Oh, good point. They really are "constants" because they're not frozen.

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.

3 participants