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

Fix GraphPresenter to work with both i18n & ERB #2139

Merged
merged 1 commit into from
Nov 19, 2015

Conversation

floehopper
Copy link
Contributor

In #2103 I forgot that we still need to support flows/questions with their
content in i18n YAML files vs ERB templates.

In this commit I've renamed the GraphPresenterTest to
GraphPresenterWithErbRendererTest and reinstated the earlier
version of GraphPresenterTest to give suitable test coverage.

I've also reinstated the i18n YAML file and used an explicit call to
Flow#use_erb_templates_for_questions in GraphPresenterWithErbRendererTest to
switch over to ERB rendering.

I've avoided needing to handle I18n::MissingInterpolationArgument by passing
in an empty Hash as the state when instantiating the QuestionPresenter.

@chrisroos
Copy link
Contributor

Looks good to me.

@chrisroos chrisroos added the LGTM label Nov 19, 2015
@chrisroos chrisroos self-assigned this Nov 19, 2015
In #2103 I forgot that we still need to support flows/questions with their
content in i18n YAML files vs ERB templates.

In this commit I've renamed the `GraphPresenterTest` to
`GraphPresenterWithErbRendererTest` and reinstated the earlier
version of `GraphPresenterTest` to give suitable test coverage.

I've also reinstated the i18n YAML file and used an explicit call to
`Flow#use_erb_templates_for_questions` in `GraphPresenterWithErbRendererTest` to
switch over to ERB rendering.

I've avoided needing to handle `I18n::MissingInterpolationArgument` by passing
in an empty `Hash` as the `state` when instantiating the `QuestionPresenter`.
@floehopper
Copy link
Contributor Author

I've rebased this against master and force-pushed in preparation for merging.

floehopper added a commit that referenced this pull request Nov 19, 2015
Fix GraphPresenter to work with both i18n & ERB
@floehopper floehopper merged commit 4c0ed13 into master Nov 19, 2015
@floehopper floehopper deleted the fix-graph-presenter branch November 19, 2015 13:49
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