{"push_id":1373629550,"size":1,"distinct_size":1,"ref":"refs/heads/student-finance-calculator/re-2017-18-updates","head":"6f62dd6296ba7155f55d7d83d760f5f2eb5aee37","before":"46d34f6057fc73c657770403df05679f4b557d23","commits":[{"sha":"6f62dd6296ba7155f55d7d83d760f5f2eb5aee37","author":{"name":"Ikenna Okpala","email":"b4a5ea001e047040e8c9075b67a268293138da2c@ikennaokpala.com"},"message":"Instantiate calculator to calculate grant and loan\n\nThis commit reverts back to the former way that sets up the calculator,\nwithin the whats_your_household_income? question before calculating\nmaintenance_grant_amount and maintenance_loan_amount.\n\nThis help avoid the problem where the smart-answers state calculator object\nthat was previously set in the first question.\n\nI tried using the on_response block like this.\n\n`\n  on_response do |response|\n    calculator.household_income = response\n  end\n`\n\n`\n  on_response do |response|\n    calculator.course_start = start_date\n    calculator.residence = where_living\n    calculator.household_income = response\n  end\n`\n\nI also tried moving grant and loan blocks to next question\n\ni.e the following blocks the next question:\n\n- maintenance_grant_amount\n- maintenance_loan_amount\n\nIn my opinion this was suppose to allow the state calculator object time to\nproperly set and hold the users household income input.\n\nThe aforementioned approach, appears to work fine for calculate blocks like\ntuition_fee_maximum as they depend on already define and set attributes\n(i.e TUITION_FEE_MAXIMUM).\n\nBut in the case of maintenance_loan_amount, there appears to be more to it\nthat means the eyes.\n\nAfter trying out the approaches mentioned above, the symptoms still persist.\n\nI discussed this with the team we decided to move ahead with this, to\nsort it out later, mainly because of the limited time available.\n\n[1] https://github.com/alphagov/smart-answers/blob/master/lib/smart_answer_flows/student-finance-calculator.rb","distinct":true,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/6f62dd6296ba7155f55d7d83d760f5f2eb5aee37"}]}
{"actor":{"display_login":"ikennaokpala"}}