lib/wcc/contentful/model_builder.rb in wcc-contentful-1.1.2 vs lib/wcc/contentful/model_builder.rb in wcc-contentful-1.2.0
- old
+ new
@@ -1,9 +1,10 @@
# frozen_string_literal: true
require_relative './link'
require_relative './sys'
+require_relative './rich_text'
module WCC::Contentful
class ModelBuilder
include Helpers
@@ -93,9 +94,11 @@
# '2018-09-28T00:00:00Z' when system time is UTC (ex. on Heroku), but translating that
# date to US Central results in '2018-09-27' which is not what the user intentded.
#
# when :DateTime
# raw_value = Time.parse(raw_value).localtime
+ when :RichText
+ raw_value = WCC::Contentful::RichText.tokenize(raw_value)
when :Int
raw_value = Integer(raw_value)
when :Float
raw_value = Float(raw_value)
end