2

J'ai installé ambethia's captcha plugin comme un plugin dans mes rails 3 app. Quand je mets le <%= recaptcha_tags %> à mon avis, il imprime ceci sur la page:Comment puis-je faire fonctionner le plugin captcha d'ambethia dans les rails 3?

<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=my_key&error=expression"></script> <noscript> <iframe src="http://api.recaptcha.net/noscript?k=my_other_key" height="300" width="500" frameborder="0"></iframe><br/> <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"></noscript> 

Est-il possible que je puisse faire ce travail dans des rails 3? J'apprécierais toute aide.

Répondre

2
<%=raw recaptcha_tags %> 
0

Vous avez déjà accepté une réponse, cependant, je cela avec Concevoir et n'a pas besoin d'utiliser brut - et oui, je suis sur Rails 3:

app/vues/utilisateurs/enregistrement/new.html.erb

<h2>Sign up</h2> 

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> 
    <%= devise_error_messages! %> 

    <p><%= f.label :email %><br /> 
    <%= f.text_field :email %></p> 

    <p><%= f.label :password %><br /> 
    <%= f.password_field :password %></p> 

    <p><%= f.label :password_confirmation %><br /> 
    <%= f.password_field :password_confirmation %></p> 

    <p><%= recaptcha_tags %></p> 

    <p><%= f.submit "Sign up" %></p> 
<% end %> 

<%= render :partial => "devise/shared/links" %> 

Reste du code est ici dans un article: http://www.communityguides.eu/articles/10

Questions connexes