Last active
October 22, 2018 15:43
-
-
Save bostonaholic/57bd187c1fd09147983e7f37149c85cb to your computer and use it in GitHub Desktop.
Ruby comments in multiline chaining
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select(...) | |
.where(...) | |
.group(...) | |
.order(...) | |
# can't comment a line in a chain | |
select(...) | |
# .where(...) | |
.group(...) | |
.order(...) | |
Thanks to @JacobNinja - "if the `.` trails the closing paren then that will work". | |
select(...). | |
# where(...). | |
group(...). | |
order(...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment