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

Cleanup global variables in profiles controller #603

Merged
merged 1 commit into from
Jul 21, 2024

Conversation

murny
Copy link
Collaborator

@murny murny commented Jul 15, 2024

When I added rubocop, I had to TODO exclude the Global Var cop due to our usage of global vars in the profile controller.

Global vars are quite dangerous in nature and their usage should probably be limited. So an easy alternative is instead just write this smarter using simple instance vars.

This PR refactors the profiles controller to use a couple before_action methods to set these instance vars instead of resorting to global vars.

@murny murny marked this pull request as ready for review July 16, 2024 21:45
Copy link
Member

@pgwillia pgwillia left a comment

Choose a reason for hiding this comment

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

@murny murny merged commit 019955c into master Jul 21, 2024
2 checks passed
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.

2 participants