Skip to content

#raw output on rich text fields contains model objects #142

@dpikt

Description

@dpikt

Not sure if this is a bug or expected behavior- feel free to close if it's the latter.

I've got a model that has a rich text field with an embedded entry. When I call #raw on an instance of that model, the output contains the entry ruby object:

$ MyModel.raw

{
 "sys"=>{...},
 "fields"=> {
   "richTextField"=>
    {
      "data"=>{},
      "content"=>
      [{"data"=>{}, "content"=>[{"data"=>{}, "marks"=>[], "value"=>"", "nodeType"=>"text"}], "nodeType"=>"paragraph"},
       ...
       # Right here
       {"data"=>{"target"=><RelatedFile[relatedFiles] id=‘1JZpjo5NYPjYlvIZiIM8w5’>}, "content"=>[], "nodeType"=>"embedded-entry-block"},
      ],
     "nodeType"=>"document"
    }
  }
}

Should this just be the JSON of the API response instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions