diff --git a/.rubocop.yml b/.rubocop.yml index 65f43eb..39aaeaa 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,9 @@ AllCops: - db/seeds.rb - bin/**/* +Style/AndOr: + Enabled: false + Style/ClassAndModuleChildren: Exclude: - test/test_helper.rb diff --git a/app/controllers/candidate_controller.rb b/app/controllers/candidate_controller.rb index f7ee689..b23d3b2 100644 --- a/app/controllers/candidate_controller.rb +++ b/app/controllers/candidate_controller.rb @@ -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 diff --git a/app/views/candidate/question.html.erb b/app/views/candidate/question.html.erb index b8a1bed..9ff5295 100644 --- a/app/views/candidate/question.html.erb +++ b/app/views/candidate/question.html.erb @@ -5,7 +5,6 @@ content_for :footer_title, "Skills Assessment" %> -