diff --git a/app/assets/javascripts/live-coder.js b/app/assets/javascripts/live-coder.js index 2616bd4..aed1f8b 100644 --- a/app/assets/javascripts/live-coder.js +++ b/app/assets/javascripts/live-coder.js @@ -113,7 +113,7 @@ $(function(){ }); // If JavaScript is enabled, display the livecoder section dynamically - var qid = 257208768; + var qid = $('form#answer-form').data('qid'); $("[data-id='live-coder-answer']").load("/live-coder-entry/" + qid, function(){ // if it loads in, and hide "finish later" checkbox $("[data-id='live-coder-finish-later']").addClass("hidden"); diff --git a/app/views/candidate/question.html.erb b/app/views/candidate/question.html.erb index 1c935a6..595259e 100644 --- a/app/views/candidate/question.html.erb +++ b/app/views/candidate/question.html.erb @@ -5,7 +5,7 @@ content_for :footer_title, "Skills Assessment" %> -<%= form_tag(post_question_path) do %> +<%= form_tag post_question_path, id: 'answer-form', data: {qid: @question.question_id} do %>

<%= @question.question %>