2

我已经在我的rails 3应用程序中安装了ambethia's captcha plugin作为插件。当我把<%= recaptcha_tags %>在我看来,它打印此页面上:如何让ambethia的captcha插件在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> 

有没有一种方式,我可以在轨道3这项工作?我会很感激任何帮助。

回答

2
<%=raw recaptcha_tags %> 
0

您已接受的答案,但是,我与设计一起使用,这并没有需要使用原始 - 是的,我对Rails的3:

应用程序/视图/用户/注册/ 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" %> 

代码的休息是这里的一篇文章:http://www.communityguides.eu/articles/10