Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class CreateEvents < ::ROM::Changeset::Create
rename_keys timestamp: :created_at
map_value :created_at, ->(time) { Time.iso8601(time).localtime }
map_value :valid_at, ->(time) { Time.iso8601(time).localtime }
map_value :data, ->(value) { value.class.name == "Hash" ? value.to_json : value }
map_value :metadata, ->(value) { value.class.name == "Hash" ? value.to_json : value }
accept_keys %i[event_id data metadata event_type created_at valid_at]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps worth adding a test recreating the situation you've encountered?

end

Expand Down