Browse Source

correct routes

CLDC-1324
JG 2 years ago committed by Kat
parent
commit
c5933b3456
  1. 2
      app/helpers/tasklist_helper.rb
  2. 3
      config/routes.rb

2
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

3
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

Loading…
Cancel
Save