开发者

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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜