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 benefit-cap-calculator to ERB #1731

Closed
wants to merge 8 commits into from

Conversation

Projects
None yet
2 participants
@chrisroos
Copy link
Contributor

commented Jun 22, 2015

No description provided.

chrisroos added some commits Jun 19, 2015

Convert outcome_not_affected_exemptions outcome
This outcome has a title and a body.

I moved the title to outcome_not_affected_exemptions_title.txt.erb.

I moved the body to outcome_not_affected_exemptions_body.govspeak.erb. The
body is an expansion of the following PhraseLists.

* outcome_not_affected_exemptions_phrase
* contact_details
Convert outcome_not_affected_no_housing_benefit outcome
This outcome has a title and a body.

I moved the title to outcome_not_affected_no_housing_benefit_title.txt.erb.

I moved the body to outcome_not_affected_no_housing_benefit_body.govspeak.erb.
The body is an expansion of the following PhraseLists.

* outcome_not_affected_no_housing_benefit_phrase
* contact_details
Convert outcome_affected_greater_than_cap outcome
This outcome has a title and a body.

I moved the title to outcome_affected_greater_than_cap_title.txt.erb.

I introduced the `new_housing_benefit_amount` precalculate block so that I
could use it in the conditional in the new body template, and in the
`new_housing_benefit` precalculate block.

I moved the body to outcome_affected_greater_than_cap_body.govspeak.erb. The
body is an expansion of the following PhraseLists.

* outcome_affected_greater_than_cap_phrase
* housing_benefit_not_zero (depending on `new_housing_benefit_amount`)
* estimate_only
* contact_details
Convert outcome_not_affected_less_than_cap outcome
This outcome has a title and a body.

I moved the title to outcome_not_affected_less_than_cap_title.txt.erb.

I moved the body to outcome_not_affected_less_than_cap_body.govspeak.erb. The
body is an expansion of the following PhraseLists.

* outcome_not_affected_less_than_cap_phrase
* contact_details
Convert outcome_not_affected outcome
This outcome has a title and a body.

I moved the title to outcome_not_affected_title.txt.erb.

I moved the body to outcome_not_affected_body.govspeak.erb. The body is an
expansion of the following PhraseLists.

* outcome_not_affected
* contact_details
Introduce dwp_contact_details partial
I've not included a newline at the end of the partial as this ensures the
regression test output is identical.
Use SmartAnswer::Flow#use_outcome_templates
In order to DRY up the flow.
Update benefit-cap-calculator-files.yml
Generated using:

    $ rails r script/generate-checksums-for-smart-answer.rb \
      benefit-cap-calculator
@floehopper

This comment has been minimized.

Copy link
Contributor

commented on ff3d2e2 Jun 22, 2015

It's a shame we have to leave out the newline at the EOF in the partial. Did you consider using -%> in the lines which render the partial?

@floehopper

This comment has been minimized.

Copy link
Contributor

commented Jun 22, 2015

Other than my one small comment, this looks good to me. 👍

@chrisroos

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2015

Did you consider using -%> in the lines which render the partial?

I didn't but agree that that's probably better. I'll make that change and get this merged to master.

@chrisroos

This comment has been minimized.

Copy link
Contributor Author

commented Jun 22, 2015

Manually merged in 5e147dc.

@chrisroos chrisroos closed this Jun 22, 2015

@chrisroos chrisroos deleted the convert-benefit-cap-calculator-to-erb branch Jun 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.