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