myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [2874] trunk/lib/rest.rb: Fix for change in time


From: noreply
Subject: [myexperiment-hackers] [2874] trunk/lib/rest.rb: Fix for change in time output format that occurred with switch to rails2.
Date: Thu, 8 Dec 2011 09:41:39 -0500 (EST)

Revision
2874
Author
dtm
Date
2011-12-08 09:41:38 -0500 (Thu, 08 Dec 2011)

Log Message

Fix for change in time output format that occurred with switch to rails2.

Modified Paths

Diff

Modified: trunk/lib/rest.rb (2873 => 2874)


--- trunk/lib/rest.rb	2011-12-08 12:04:23 UTC (rev 2873)
+++ trunk/lib/rest.rb	2011-12-08 14:41:38 UTC (rev 2874)
@@ -262,7 +262,11 @@
               if query['version'] and model_data['Versioned'][i] == 'yes'
                 text = eval("ob.find_version(#{query['version']}).#{accessor}").to_s
               else
-                text = eval("ob.#{accessor}").to_s
+                val = eval("ob.#{accessor}")
+		if val.class == ActiveSupport::TimeWithZone
+                   text = val.time().to_s
+                else
+                   text = val.to_s
               end
             end
           end

reply via email to

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