Permalink
Browse files

typecast timestamps with .to_time

  • Loading branch information...
1 parent 29ab73e commit 9bf4b9c9924568d17f67d16d3d35a33350973778 @pboling pboling committed Feb 20, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/activerecord-postgres-array/string.rb
@@ -32,6 +32,8 @@ def from_postgres_array(base_type = :string)
elements.collect(&:to_f)
elsif base_type == :integer || base_type == :bigint
elements.collect(&:to_i)
+ elsif base_type == :timestamp
+ elements.collect(&:to_time)
else
elements
end

0 comments on commit 9bf4b9c

Please sign in to comment.