Skip to content

Commit b4a6280

Browse files
committed
undo unwanted change
1 parent 5c56c77 commit b4a6280

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

spec/type_spec.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
require "couchbase-orm/types"
55

66
class DateTimeWith3Decimal < CouchbaseOrm::Types::DateTime
7-
def initialize
8-
super
9-
@precision=3
10-
end
7+
def serialize(value)
8+
value&.iso8601(3)
9+
end
1110
end
1211

1312
ActiveModel::Type.register(:datetime3decimal, DateTimeWith3Decimal)
@@ -18,7 +17,7 @@ class TypeTest < CouchbaseOrm::Base
1817
attribute :size, :float
1918
attribute :renewal_date, :date
2019
attribute :subscribed_at, :datetime
21-
attribute :some_time, :timestamp, precision: 0
20+
attribute :some_time, :timestamp
2221
attribute :precision3_time, :datetime3decimal
2322
attribute :precision6_time, :datetime, precision: 6
2423

0 commit comments

Comments
 (0)