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

Refactor loads and authorize resource part 5 #721

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

kaspth
Copy link
Contributor

@kaspth kaspth commented Dec 14, 2023

Replace eval with direct setting of variables and/or instance_variable_set as appropriate.

From #525

Also closes #525.

@kaspth kaspth requested a review from jagthedrummer December 14, 2023 18:20
@jagthedrummer jagthedrummer force-pushed the refactor-loads-and-authorize-resource-part-4 branch from 5d9c39d to ff15506 Compare December 14, 2023 19:04
Base automatically changed from refactor-loads-and-authorize-resource-part-4 to main December 14, 2023 19:18
I'm grouping it with the exception so it's easier to see why `through_as_symbols.first` works.
`eval` just evaluates in the same scope, so if we can assign instance variables in there, we can both get and assign them without eval.
@jagthedrummer jagthedrummer force-pushed the refactor-loads-and-authorize-resource-part-5 branch from 312c11e to dd916df Compare December 14, 2023 19:21
…/concerns/bullet_train/loads_and_authorizes_resource.rb

Co-authored-by: Jeremy Green <[email protected]>
@jagthedrummer jagthedrummer merged commit 3990b5a into main Dec 14, 2023
30 checks passed
@jagthedrummer jagthedrummer deleted the refactor-loads-and-authorize-resource-part-5 branch December 14, 2023 20:10
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