Skip to content

Commit

Permalink
Adds business and citizen results to checker controller
Browse files Browse the repository at this point in the history
We should now be able to use these in the view instead of actions
  • Loading branch information
huwd committed Dec 3, 2019
1 parent ddacc39 commit 8420579
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/brexit_checker_controller.rb
Expand Up @@ -34,6 +34,9 @@ def results
all_actions = BrexitChecker::Action.load_all
@criteria = BrexitChecker::Criterion.load_by(criteria_keys)
@actions = filter_items(all_actions, criteria_keys)
@audience_actions = @actions.group_by(&:audience)
@business_results = BrexitChecker::ResultsAudiences.populate_business_groups(@audience_actions["business"], @criteria)
@citizen_results = BrexitChecker::ResultsAudiences.populate_citizen_groups(@audience_actions["citizen"], @criteria)
end

def email_signup; end
Expand Down

0 comments on commit 8420579

Please sign in to comment.