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

Convert estimate-self-assessment-penalties to use ERB templates for questions #2133

Conversation

floehopper
Copy link
Contributor

No description provided.

@chrisroos
Copy link
Contributor

I think we might want to fix the ampersand escaping before merging this one.

@chrisroos chrisroos self-assigned this Nov 19, 2015
@floehopper floehopper force-pushed the convert-estimate-self-assessment-penalties-to-use-erb-templates-for-questions branch from 04be768 to 8f2a137 Compare November 19, 2015 12:25
@floehopper
Copy link
Contributor Author

@chrisroos: I've addressed the ampersand-escaping issue using an interactive rebase in this new commit. I've also updated the regression test checksums and force-pushed.

@chrisroos
Copy link
Contributor

Looks good to me.

@chrisroos chrisroos added the LGTM label Nov 19, 2015
I ran the following command:

    $ rails r script/convert-question-i18-yaml-to-erb-templates.rb lib/smart_answer_flows/estimate-self-assessment-penalties
    Writing template: which_year.govspeak.erb
    Writing template: how_submitted.govspeak.erb
    Writing template: when_submitted.govspeak.erb (WARNING: contains interpolation)
    Writing template: when_paid.govspeak.erb (WARNING: contains interpolation)
    Writing template: how_much_tax.govspeak.erb

    Deleting i18n YAML: estimate-self-assessment-penalties.yml

    Now insert `use_erb_templates_for_questions` at top of flow: estimate-self-assessment-penalties.rb
These were not dealt with automatically by the conversion script.
Since #2098 & #2112, ampersands rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the content in the ERB template to use the HTML
entity for ampersand.
The change to ERB templates has introduced a few extra newlines in the
question page HTML, but none of them affect the content viewable by the user.

I verified that the changes were all only blank lines using the following
command:

    $ git diff --ignore-blank-lines
Re-generating the checksums has removed the i18n YAML file and added the new
question templates as I expected.
@chrisroos chrisroos force-pushed the convert-estimate-self-assessment-penalties-to-use-erb-templates-for-questions branch from 8f2a137 to 7fb68e1 Compare November 19, 2015 16:30
@chrisroos
Copy link
Contributor

I've rebased on master and force pushed in preparation for merging.

chrisroos added a commit that referenced this pull request Nov 19, 2015
…nt-penalties-to-use-erb-templates-for-questions

Convert estimate-self-assessment-penalties to use ERB templates for questions
@chrisroos chrisroos merged commit e1fc85d into master Nov 19, 2015
@chrisroos chrisroos deleted the convert-estimate-self-assessment-penalties-to-use-erb-templates-for-questions branch November 19, 2015 16:37
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