|
|
|
@ -26,7 +26,7 @@ class CaseLogsController < ApplicationController
|
|
|
|
|
previous_page = params[:case_log][:previous_page] |
|
|
|
|
questions_for_page = form.questions_for_page(previous_page).keys |
|
|
|
|
answers_for_page = page_params(questions_for_page).select { |k, _v| questions_for_page.include?(k) } |
|
|
|
|
@case_log.previous_page(previous_page) |
|
|
|
|
@case_log.previous_page = previous_page |
|
|
|
|
if @case_log.update(answers_for_page) |
|
|
|
|
redirect_path = form.next_page_redirect_path(previous_page) |
|
|
|
|
redirect_to(send(redirect_path, @case_log)) |
|
|
|
|