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

Allow Collection#join to be used without a block #448

Merged
merged 1 commit into from
Apr 12, 2017

Conversation

george-carlin
Copy link
Contributor

Most of the time when I use Collection#join, I don't actually care about calling custom methods etc., I just want to stick some HTML in between each rendered cell. But #join insists on taking a block, so I have to do something like this:

my_collection.join('<hr>') { |cell| cell }

This PR makes the block optional, so I can just do it like this:

my_collection.join('<hr>')

@george-carlin
Copy link
Contributor Author

If you approve this then I updated the docs too at trailblazer/trailblazer.github.io#91

apotonick added a commit to trailblazer/trailblazer.github.io that referenced this pull request Apr 12, 2017
@apotonick apotonick merged commit 051a277 into trailblazer:master Apr 12, 2017
@george-carlin george-carlin deleted the collection-join branch April 27, 2017 17:46
@george-carlin
Copy link
Contributor Author

Can we pretty please get a release that includes this feature? :)

@apotonick
Copy link
Member

cells$ gem push cells-4.1.7.gem 
Pushing gem to https://rubygems.org...
Successfully registered gem: cells (4.1.7)

@george-carlin
Copy link
Contributor Author

Thanks! :)

george-carlin added a commit to george-carlin/abroaders that referenced this pull request May 8, 2017
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.

2 participants