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 part-year-profit-tax-credits to use ERB templates for questions #2143

Conversation

floehopper
Copy link
Contributor

Note that this flow has no integration tests, but all the other unit & integration tests are passing, so I think all is well.

@chrisroos
Copy link
Contributor

Looks good to me.

@chrisroos chrisroos self-assigned this Nov 19, 2015
@chrisroos chrisroos added the LGTM label Nov 19, 2015
This was causing me problems when I tried to make the change to use an ERB
template for the question, because some of the setup in the second context was
needed by the tests in the first context. This is because when any question
attribute is accessed, the whole ERB template has to be rendered.
I ran the following command:

    $ rails r script/convert-question-i18-yaml-to-erb-templates.rb lib/smart_answer_flows/part-year-profit-tax-credits
    Writing template: when_did_your_tax_credits_award_end.govspeak.erb
    Writing template: have_you_stopped_trading.govspeak.erb
    Writing template: did_you_start_trading_before_the_relevant_accounting_year.govspeak.erb (WARNING: contains interpolation)
    Writing template: when_did_you_stop_trading.govspeak.erb (WARNING: contains interpolation)
    Writing template: what_date_do_your_accounts_go_up_to.govspeak.erb
    Writing template: do_your_accounts_cover_a_12_month_period.govspeak.erb (WARNING: contains interpolation)
    Writing template: when_did_you_start_trading.govspeak.erb (WARNING: contains interpolation)
    Writing template: what_is_your_taxable_profit.govspeak.erb (WARNING: contains interpolation)

    Deleting i18n YAML: part-year-profit-tax-credits.yml

    Now insert `use_erb_templates_for_questions` at top of flow: part-year-profit-tax-credits.rb
These were not dealt with automatically by the conversion script.
@chrisroos chrisroos force-pushed the convert-part-year-profit-tax-credits-to-use-erb-templates-for-questions branch from ac2ac22 to a26cb20 Compare November 19, 2015 17:11
@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
…redits-to-use-erb-templates-for-questions

Convert part-year-profit-tax-credits to use ERB templates for questions
@chrisroos chrisroos merged commit be72f16 into master Nov 19, 2015
@chrisroos chrisroos deleted the convert-part-year-profit-tax-credits-to-use-erb-templates-for-questions branch November 19, 2015 17:16
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