myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3165] trunk/config/environment.rb: removed pre r


From: noreply
Subject: [myexperiment-hackers] [3165] trunk/config/environment.rb: removed pre rails 2. 2 workaround now that we're on rails 2.3.14
Date: Fri, 19 Oct 2012 09:45:57 +0000 (UTC)

Revision
3165
Author
dgc
Date
2012-10-19 09:45:57 +0000 (Fri, 19 Oct 2012)

Log Message

removed pre rails 2.2 workaround now that we're on rails 2.3.14

Modified Paths

Diff

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]