Coder Social home page Coder Social logo

Rails 4 integration about recaptcha HOT 18 CLOSED

ambethia avatar ambethia commented on July 26, 2024
Rails 4 integration

from recaptcha.

Comments (18)

freelancewebdev avatar freelancewebdev commented on July 26, 2024 1

You don't have to sacrifice your turbolinks to get this working as it is - simply use the ajax API so your call to Recaptcha in your form would look like

<%= recaptcha_tags ajax: true %>

from recaptcha.

ambethia avatar ambethia commented on July 26, 2024

I will be updating for Rails 4 soon! Thanks for bringing this up.

from recaptcha.

bismark64 avatar bismark64 commented on July 26, 2024

Thanks!

from recaptcha.

kalkov avatar kalkov commented on July 26, 2024

I have the same issue. Any progress?

from recaptcha.

bismark64 avatar bismark64 commented on July 26, 2024

I have avoided the issue putting "data-no-turbolink" => true in the link who leads to the page that has the recaptcha tag. That causes a complete reload of the page, so the recapcha form will render properly.

from recaptcha.

kalkov avatar kalkov commented on July 26, 2024

@bismark64 : Thanks, it works perfect ;)

from recaptcha.

starrychloe avatar starrychloe commented on July 26, 2024

Here is how you might be able to fix it. This is how I fixed a problem with jQuery and Turbolinks. There is a page:load event.

http://stackoverflow.com/questions/17386740/rails-4-turbolinks-and-jquery-dynamic-links-not-playing-nice?rq=1

from recaptcha.

peteykun avatar peteykun commented on July 26, 2024

Using ajax: true seems to put an iframe pointing to about:blank at the end of the document. o.o
This adds some padding after my footer and messes it up.

Edit: Setting iframe { display: block; } seems to have fixed my problem, so ajax: true seems to have solved my problem, thanks! :)

from recaptcha.

skplunkerin avatar skplunkerin commented on July 26, 2024

Thanks @freelancewebdev, that fixed this problem for me!

I didn't have issues with the added iFrame messing up my page layout, but it's good to see that a solution for that possible problem being fixed too. Thanks @peteykun!

from recaptcha.

bodrovis avatar bodrovis commented on July 26, 2024

Using jquery-turbolinks does not help but

<%= recaptcha_tags ajax: true %>

indeed does.

from recaptcha.

FLemon avatar FLemon commented on July 26, 2024

hi @ambethia , what's the progress of Rails 4 compatibility ?

from recaptcha.

bodrovis avatar bodrovis commented on July 26, 2024

@FLemon It does work with Rails 4

from recaptcha.

FLemon avatar FLemon commented on July 26, 2024

@bodrovis , which version is Rails4, and is it compatible with both Rails3 and 4(as i am upgrading my app to Rails4 in transitional steps)

from recaptcha.

FLemon avatar FLemon commented on July 26, 2024

@bodrovis , the current latest i presume ?

from recaptcha.

bodrovis avatar bodrovis commented on July 26, 2024

@FLemon Well, in my Rails 4.1.6 project it does work and it used to work with Rails 3. Feel free to try it out :)

from recaptcha.

FLemon avatar FLemon commented on July 26, 2024

cool @bodrovis thanks for your reply

from recaptcha.

simonlehmann avatar simonlehmann commented on July 26, 2024

Experiencing this issue now in a Rails 5.2 implementation (with Turbolinks). I'm using reCAPTCHA v3, however, parsing the ajax: true argument to the recaptcha_v3 method has no effect, and doesn't seem to be included in the table of available arguments under the recaptcha_v3 heading of the README. Is there a solution for this issue that will work for reCAPCTHA v3 implementation? Thanks

from recaptcha.

grosser avatar grosser commented on July 26, 2024

please make a PR if you find a solution ... best start with bundle open recaptcha and debug from there

from recaptcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.