Added numeric ability for text nodes. - #470
Closed
bobbytables wants to merge 1 commit into
Closed
Conversation
Contributor
|
This has been already reported in #154 and it also accepts any object that has |
gregbell
added a commit
that referenced
this pull request
Jan 11, 2012
Before this commit:
index do
column("My Column"){ 1 }
end
Would result in an empty column. Now the object is appended to the DOM
and will result in a colum of "1"s.
The return value is ignored if the user has already appended other
elements to the DOM. This might trip up some users, however it is more
likely that you are either going to build up a DOM structure or return a
simple value, not both.
Thanks for the pull requests from @bobbytables and @utkarshkukreti
References isses #470, 154
Contributor
|
Fixed on master in 9cb2b90 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I discovered that table_for (and any tag really) created with Arbre with the content of a numeric value would just not display anything. For example:
The column for comments will be blank because "comments_count" is a number.
The code in builder.rb prevents this on this line:
I added spec but wasn't sure if it was to par, sorry if isn't.