title: Recaptcha only showing up after page refresh - Rails 4 - Devise
body: <p>I have installed recaptcha according to the gem instructions, however when I view the sign_up page (using Devise), the catcha doesn't appear until I refresh the page.</p>
  
  <p>Looking through other comments, the recommendation is to disable turbolinks (which I am using) by changing the sign_in link to:</p>
  
  <pre><code>&lt;%= link_to "Sign up", new_registration_path, "data-no-turbolink" =&gt; true %&gt;&lt;br /&gt;
  </code></pre>
  
  <p>I have tried this, but I still don't get the captcha until I do a page refresh.</p>
  
  <p>Relevant code:</p>
  
  <p>Views/devise/registrations/new.html.erb</p>
  
  <pre><code>................
  &lt;%= recaptcha_tags %&gt;
  ................
  </code></pre>
  
  <p>/controllers/users/registrations_controller.rb</p>
  
  <pre><code>class Users::RegistrationsController &lt; Devise::RegistrationsController
    def create
      if !verify_recaptcha
       flash.delete :recaptcha_error
       build_resource
       resource.valid?
       resource.errors.add(:base, "There was an error with the recaptcha code below. Please re-enter the code.")
       clean_up_passwords(resource)
       respond_with_navigational(resource) { render_with_scope :new }
     else
      flash.delete :recaptcha_error
      super
     end
    end
  
    def clean_up_passwords(*args)
     # Delete or comment out this method to prevent the password fields from 
     # repopulating after a failed registration
    end
   end
  </code></pre>