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 default block for contentOf #61

Merged
merged 2 commits into from
Jul 20, 2018

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Jun 14, 2018

Fixes #57

@matryer
Copy link
Contributor

matryer commented Jun 15, 2018

Nice work @ruudk - sorry for breaking it.

for k, v := range data {
ctx.Set(k, v)
}
body, err := help.BlockWith(ctx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The block shouldn't be required. Currently this code will return an error if there is no block, which isn't the expected behavior of contentOf. You should check to see if there is a block first, before trying to run it.

Copy link
Contributor Author

@ruudk ruudk Jun 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, but how come the tests pass?
Now I get it! Will fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@ruudk ruudk force-pushed the default-content-of branch from 6557ebd to 3ea790b Compare June 18, 2018 19:21
@ruudk
Copy link
Contributor Author

ruudk commented Jul 20, 2018

What's needed to get this merged?

@markbates markbates merged commit d4510ca into gobuffalo:master Jul 20, 2018
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.

4 participants