diff --git a/app/helpers/tasklist_helper.rb b/app/helpers/tasklist_helper.rb index 4a187dd3a..ba4ea9a14 100644 --- a/app/helpers/tasklist_helper.rb +++ b/app/helpers/tasklist_helper.rb @@ -20,7 +20,7 @@ module TasklistHelper if log.id send(path, log) else - "/logs/new/#{next_question_page(subsection, log, current_user)}" + "/#{log.lettings? ? "lettings" : "sales"}-logs/new/#{next_question_page(subsection, log, current_user)}" end end diff --git a/config/routes.rb b/config/routes.rb index 09be8a3cd..f0dd9314e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -31,7 +31,8 @@ Rails.application.routes.draw do FormHandler.instance.forms.each do |_key, form| form.pages.map do |page| - get "/logs/new/#{page.id.to_s.dasherize}", to: "form#show_new_page" + get "/lettings-logs/new/#{page.id.to_s.dasherize}", to: "form#show_new_page" + get "/sales-logs/new/#{page.id.to_s.dasherize}", to: "form#show_new_page" end end