ReCaptcha problems in Ruby on Rails
I have followed the directions posted on ReCaptcha's site about integrating Recaptcha into my application. However when I go to view开发者_JS百科 it on my localhost I just get the code for get_captcha() instead of the widget. I have made the public keys available in my environment.rb file, added the recaptcha::apphelper to my application controller, and chained my vaildation, I have also included the recaptcha::viewhelper to my application helper. Am I missing a step in adding it, or is there another resource that would make this work better?
In the view you must use an ERB output block (<%=
) to make this output the captcha:
<%= raw(get_captcha(:options => {:theme => 'white', :tabindex => 10) %>
Anything not in this (or it's brother, the ERB evaluation block (<%
)) will be treated as plain text.
精彩评论