From 7b3b50c59252e99985e5be0b438ec2b042a1ae67 Mon Sep 17 00:00:00 2001 From: JG Date: Tue, 20 Sep 2022 10:14:54 +0100 Subject: [PATCH] correct path --- app/controllers/form_controller.rb | 2 +- app/models/form.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 78c9d0fbd..f86e55597 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -133,7 +133,7 @@ private def find_resource - @log = if is_new_log_request? || new_log_referrer? + @log = if new_log_request? || new_log_request_referrer? LettingsLog.new(owning_organisation: current_user.support? ? nil : current_user.organisation) else params.key?("sales_log") ? current_user.sales_logs.find_by(id: params[:id]) : current_user.lettings_logs.find_by(id: params[:id]) diff --git a/app/models/form.rb b/app/models/form.rb index 133b84c3d..f73e5348f 100644 --- a/app/models/form.rb +++ b/app/models/form.rb @@ -76,7 +76,7 @@ class Form if nxt_page == :check_answers "#{type}_log_#{subsection_for_page(page).id}_check_answers_path" else - log.id ? "#{type}_log_#{nxt_page}_path" : "new_#{nxt_page}_#{type}_logs_path" + log.id ? "#{type}_log_#{nxt_page}_path" : "#{type}_logs_new_#{nxt_page}_path" end end