Created
February 18, 2012 18:04
-
-
Save jancel/1860426 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def build_table | |
build_table_head | |
build_table_body unless @collection.blank? | |
end | |
versus | |
def build_table | |
build_table_head | |
build_table_body | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If we need to, we can also do this in build_table_body directly, the problem is that when a collection is blank, it is evaluating and still putting it in the tbody ([]) which ends up looking messy.