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

Remove instance variables from helper usage #24203

Merged
merged 3 commits into from
Apr 23, 2023

Conversation

mjankowski
Copy link
Contributor

There were 3 helpers violating the Rails/HelperInstanceVariable cop. In each chase there was an i-var set outside the context of the helper which the method was assuming would be set, instead of getting explicitly passed in.

This updates those three places to pass in the needed value instead of assuming the i-var exists.

@mjankowski mjankowski force-pushed the helper-instance-vars branch 2 times, most recently from b9e9a66 to 6d051dc Compare March 27, 2023 16:58
@mjankowski mjankowski force-pushed the helper-instance-vars branch from 6d051dc to 371da16 Compare April 11, 2023 09:32
@mjankowski mjankowski force-pushed the helper-instance-vars branch from 371da16 to 7281d1a Compare April 11, 2023 12:47
@Gargron Gargron merged commit 0a5f0a8 into mastodon:main Apr 23, 2023
@mjankowski mjankowski deleted the helper-instance-vars branch April 24, 2023 13:18
michealmikeyb pushed a commit to michealmikeyb/mastodon that referenced this pull request May 3, 2023
skerit pushed a commit to 11ways/mastodon that referenced this pull request Jul 7, 2023
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