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

Simplify boolean logic into ternary #1593

Merged
merged 1 commit into from
Jun 9, 2011
Merged

Simplify boolean logic into ternary #1593

merged 1 commit into from
Jun 9, 2011

Conversation

r00k
Copy link
Contributor

@r00k r00k commented Jun 9, 2011

A line with foo && bar || baz is equivalent to foo ? bar : baz, but the latter is almost definitely easier to follow. I think it's a clear readability win to switch.

Comments welcome!

tenderlove added a commit that referenced this pull request Jun 9, 2011
Simplify boolean logic into ternary
@tenderlove tenderlove merged commit 9295053 into rails:master Jun 9, 2011
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

3 participants