Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

typecast timestamps with .to_time

  • Loading branch information...
commit 9bf4b9c9924568d17f67d16d3d35a33350973778 1 parent 29ab73e
@pboling pboling authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/activerecord-postgres-array/string.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.