From 9ebe41a26c15d177b016a3444f68fe9cb95825f5 Mon Sep 17 00:00:00 2001 From: Christian Rijke Date: Fri, 7 Jun 2013 15:36:02 +0200 Subject: [PATCH] Remove deprecated code for Rails 2. --- lib/widget.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/widget.rb b/lib/widget.rb index d0fca76d43..d3b4387735 100644 --- a/lib/widget.rb +++ b/lib/widget.rb @@ -45,7 +45,9 @@ end ActionView::Base.send(:include, Widget::RenderWidgetInstanceMethods) ActionController::Base.send(:include, Widget::RenderWidgetInstanceMethods) -if Rails.version.start_with? "2" - class ::String; def html_safe; self; end; end + +class ::String + def write(s) + concat(s) + end end -class ::String; def write(s); concat(s); end; end