|
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) |
Fix for change in time output format that occurred with switch to rails2.
--- 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
[Prev in Thread] | Current Thread | [Next in Thread] |