Modified: trunk/config/environment.rb (3164 => 3165)
--- trunk/config/environment.rb 2012-10-18 06:01:54 UTC (rev 3164)
+++ trunk/config/environment.rb 2012-10-19 09:45:57 UTC (rev 3165)
@@ -106,17 +106,3 @@
load 'config/environment_private.rb' if FileTest.exist?('config/environment_private.rb')
-# Fix for Ruby 1.8.7 when using Rails < 2.2
-if RUBY_VERSION == "1.8.7" && ((Rails::VERSION::MAJOR == 1) || (Rails::VERSION::MAJOR == 2 && Rails::VERSION::MINOR < 2))
- module ActionView
- module Helpers
- module TextHelper
- def truncate(text, length = 30, truncate_string = "...")
- if text.nil? then return end
- l = length - truncate_string.chars.to_a.size
- (text.chars.to_a.size > length ? text.chars.to_a[0...l].join + truncate_string : text).to_s
- end
- end
- end
- end
-end