title: Rails - page is not loading after submitting form through ajax
body: <p>I have a form in which i am using ajax validation, for that i have made the form as :remote => true and the view is given as</p>
  
  <pre><code>&lt;%= nested_form_for @interview_round, :remote =&gt; true do |f| %&gt;
     &lt;div id="error-div"&gt; &lt;/div&gt;
  &lt;%= f.text_field :interviewer_name %&gt;
  &lt;%= f.text_field :log_skill, :id=&gt;'hint-log' %&gt;
  &lt;%= f.text_field :comm_skill, :id=&gt;'hint-comm' %&gt;
  &lt;%= f.submit %&gt;
    &lt;% end %&gt;
  </code></pre>
  
  <p>and the controller is given as</p>
  
  <pre><code>  def update
      @interview_round = InterviewRound.where(id: params[:id]).first
      respond_to do |format|
       if  @interview_round.update_attributes round_params
  
          format.html{ redirect_to interview_path(@interview_round.interview_id), notice: I18n.t('round_created')}
          format.js
       else
         format.html { render :action =&gt; "edit" }
         format.js
       end
        end
    end
  </code></pre>
  
  <p>i am showing the errors in the update.js.erb</p>
  
  <pre><code>&lt;% if @interview_round.errors.present?%&gt;
  $('#error-div').html('&lt;%= j(render 'shared/error_messages', :target =&gt; @interview_round) %&gt;');
  &lt;% else %&gt;
  $('form.edit_interview_round').removeAttr('data-remote')
  &lt;% end %&gt;
  </code></pre>
  
  <p>Now when i am submitting form the errors are coming remotely through ajax and showing on the page but when i am submitting the form without any error the page is not redirecting to the desired page but it is storing the data in database and submitting the form , though i am also trying to remove the data-remote on the form when there are no error it is removing in the HTML  but still the page is not loading when i submit </p>
  
  <p>Please Help !!</p>