Browse Source

correct path

CLDC-1324
JG 2 years ago committed by Kat
parent
commit
7b3b50c592
  1. 2
      app/controllers/form_controller.rb
  2. 2
      app/models/form.rb

2
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])

2
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

Loading…
Cancel
Save