undefined method `html_safe' for #<String:0x1042222c0> using recaptcha
I'm getting this error on the line where I call recaptcha_tags
&开发者_开发知识库lt;%= recaptcha_tags( :public_key => 'XXXXXXYYYYYYYZZZ-ZXYXXZYZ' , :display=>{:theme=>"white" }) %>
I'm working with rails 2.3.10
how can I solve this error?
many thanks.
In Rails 2.3.x, html_safe is defined as a String class method in:
activesupport/lib/active_support/core_ext/string/output_safety.rb
Make sure that you have the proper active_support version (one matching your rails version).
Well i did what's specified here https://github.com/ambethia/recaptcha/issues/30 and worked out perfectly for me
Changing client_helper.rb line 39 to:
return (html.respond_to?(:html_safe) && html.html_safe) || html
fixes the issue.
精彩评论