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

StrongParam helper for disambiguating parameters #2735

Merged
merged 1 commit into from
Jan 27, 2021

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Oct 6, 2020

Consider this a design review. The point is all explained in depth in the comments, I won't restate it here.

This is an idea I've been contemplating for a long time. I want people to think about whether using this idiom -- sparingly, in the kinds of places where we may have used an enum to bring more clarity than a bare bool or int -- would help improve code readability and reduce parameter passing errors. If so, I'd like to start using it. But if people think it's a needless flourish that detracts from code readability, then I can be persuaded to abandon it.

Signed-off-by: Larry Gritz lg@larrygritz.com

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz
Copy link
Collaborator Author

lgritz commented Oct 15, 2020

Does anybody have thoughts, pro or con, about this kind of idiom to clarify parameter passing in some cases?

@lgritz
Copy link
Collaborator Author

lgritz commented Jan 27, 2021

I've sat on this for a long time, but I'm going to merge now because I just had to fix a really embarrassing bug that would not have happened if I'd used this idiom: #2844

@lgritz lgritz merged commit b1ebfda into AcademySoftwareFoundation:master Jan 27, 2021
@lgritz lgritz deleted the lg-strong branch March 21, 2021 04:48
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.

None yet

1 participant