Permalink
Browse files

Make html_safe more agnostic about rails

  • Loading branch information...
1 parent a27b8ae commit 2865b4e9459fd00b4cdeac0b36ba261f36b57473 @sax sax committed with Curtis Miller Apr 17, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/honeypot-captcha/form_tag_helper.rb
@@ -6,7 +6,7 @@ def form_tag_with_honeypot(url_for_options = {}, options = {}, *parameters_for_u
honeypot = options.delete(:honeypot)
html = form_tag_without_honeypot(url_for_options, options, *parameters_for_url, &block)
if honeypot
- captcha = (Rails.version > "3") ? honey_pot_captcha.html_safe : honey_pot_captcha
+ captcha = "".respond_to?(:html_safe) ? honey_pot_captcha.html_safe : honey_pot_captcha
if block_given?
html.insert(html.index('</form>'), captcha)
else

0 comments on commit 2865b4e

Please sign in to comment.