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

Handle empty templates #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Handle empty templates #77

wants to merge 1 commit into from

Conversation

tobiashm
Copy link

If the template returns without rendering anything, Xray.augment_template should not be called.

The scenario might be a conditional return statement in a partial, to avoid it being rendered in some cases.

Alternatively, Xray.augment_template could return immediately if the input source is nil?

If the template returns without rendering anything, `Xray.augment_template` should not be called.

The scenario might be a conditional `return` statement in a partial, to avoid it being rendered in some cases.

Alternatively, `Xray.augment_template` could return immediately if the input source is nil?
@mattbrictson
Copy link
Collaborator

Thanks for the PR!

Is there any way I can test this to verify the behavior? For example, could you provide a gist containing a sample controller + view?

Ideally I would like to include a test in the gem itself; if you have any thoughts on how that could be done, let me know and I can help you include it in this PR.

Finally, in order to merge I need to you to add a CHANGELOG entry explaining your contribution.

Thanks!

@jesperronn
Copy link

@tobiashm @mattbrictson would be nice to merge this. @tobiashm any updates on creating a test/gist for this?

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.

3 participants