added save routing
This commit is contained in:
@ -9,8 +9,7 @@ class CandidateController < ApplicationController
|
||||
end
|
||||
|
||||
def update_question
|
||||
|
||||
redirect_to saved_path if params[:submit] == 'Save'
|
||||
redirect_to :saved and return if params[:save] == 'Save'
|
||||
redirect_to :question
|
||||
end
|
||||
|
||||
@ -26,4 +25,10 @@ class CandidateController < ApplicationController
|
||||
def validate
|
||||
redirect_to :question
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def question_params
|
||||
params.permit(:save)
|
||||
end
|
||||
end
|
||||
|
@ -5,7 +5,6 @@
|
||||
content_for :footer_title, "Skills Assessment"
|
||||
%>
|
||||
|
||||
<form method="post" action="/question">
|
||||
<%= form_tag(post_question_path) do %>
|
||||
<main class="questions_tpl">
|
||||
<h2 class="question-text"><%= @question.question %></h2>
|
||||
|
Reference in New Issue
Block a user