You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered some difficulty marshalling Contentful::Asset objects nested within other Contentful::Entry objects returned by the gem. Here's some REPL code that should be illustrative:
2.2.4 (#<ContentfulClientService:0x007ffea8218708>):0 > image
=> #<Image: @properties={:image=>#<Contentful::Asset: @fields={:title=>"Slider 1 - The No Makeup-Makeup Redux", :description=>"natural-looking makeup", :file=>#<Contentful::File: @properties={:fileName=>"Slider 1 - The No Makeup-Makeup Redux", :contentType=>"image/jpeg", :details=>{"image"=>{"width"=>1000, "height"=>667}, "size"=>594865}, :url=>"//images.contentful.com/g8qtv9gzg47d/image_post_78787/5508ddf7049078118beca005464d2647/Slider_1_-_The_No_Makeup-Makeup_Redux"}>} @sys={:space=>#<Contentful::Link: @sys={:type=>"Link", :linkType=>"Space", :id=>"g8qtv9gzg47d"}>, :type=>"Asset", :id=>"image_post_78787", :revision=>2, :createdAt=>Fri, 26 Feb 2016 16:02:07 +0000, :updatedAt=>Fri, 26 Feb 2016 16:05:31 +0000, :locale=>"en-US"}>, :caption=>nil, :credit=>nil} @fields={:name=>"Slider 1 - The No Makeup-Makeup Redux", :image=>#<Contentful::Asset: @fields={:title=>"Slider 1 - The No Makeup-Makeup Redux", :description=>"natural-looking makeup", :file=>#<Contentful::File: @properties={:fileName=>"Slider 1 - The No Makeup-Makeup Redux", :contentType=>"image/jpeg", :details=>{"image"=>{"width"=>1000, "height"=>667}, "size"=>594865}, :url=>"//images.contentful.com/g8qtv9gzg47d/image_post_78787/5508ddf7049078118beca005464d2647/Slider_1_-_The_No_Makeup-Makeup_Redux"}>} @sys={:space=>#<Contentful::Link: @sys={:type=>"Link", :linkType=>"Space", :id=>"g8qtv9gzg47d"}>, :type=>"Asset", :id=>"image_post_78787", :revision=>2, :createdAt=>Fri, 26 Feb 2016 16:02:07 +0000, :updatedAt=>Fri, 26 Feb 2016 16:05:31 +0000, :locale=>"en-US"}>} @sys={:space=>#<Contentful::Link: @sys={:type=>"Link", :linkType=>"Space", :id=>"g8qtv9gzg47d"}>, :type=>"Entry", :contentType=>#<Contentful::Link: @sys={:type=>"Link", :linkType=>"ContentType", :id=>"48qqOz2Bj2oQSwKkW2C6ee"}>, :id=>"image_78787", :revision=>1, :createdAt=>Fri, 26 Feb 2016 16:00:41 +0000, :updatedAt=>Fri, 26 Feb 2016 16:00:41 +0000, :locale=>"en-US"}>
2.2.4 (#<ContentfulClientService:0x007ffea8218708>):0 > Marshal.dump(image)
TypeError: can't dump anonymous class #<Module:0x007ffea9c9ca20>
2.2.4 (#<ContentfulClientService:0x007ffea8218708>):0 > asset = image.properties[:image]
=> #<Contentful::Asset: @fields={:title=>"Slider 1 - The No Makeup-Makeup Redux", :description=>"natural-looking makeup", :file=>#<Contentful::File: @properties={:fileName=>"Slider 1 - The No Makeup-Makeup Redux", :contentType=>"image/jpeg", :details=>{"image"=>{"width"=>1000, "height"=>667}, "size"=>594865}, :url=>"//images.contentful.com/g8qtv9gzg47d/image_post_78787/5508ddf7049078118beca005464d2647/Slider_1_-_The_No_Makeup-Makeup_Redux"}>} @sys={:space=>#<Contentful::Link: @sys={:type=>"Link", :linkType=>"Space", :id=>"g8qtv9gzg47d"}>, :type=>"Asset", :id=>"image_post_78787", :revision=>2, :createdAt=>Fri, 26 Feb 2016 16:02:07 +0000, :updatedAt=>Fri, 26 Feb 2016 16:05:31 +0000, :locale=>"en-US"}>
2.2.4 (#<ContentfulClientService:0x007ffea8218708>):0 > Marshal.dump(asset)
TypeError: can't dump anonymous class #<Module:0x007ffea9c9ca20>
Have you got any recommendations on marshalling these assets, or plans to support it in the future along the lines of #81?
Thanks for your help!
The text was updated successfully, but these errors were encountered:
Hi there,
I've encountered some difficulty marshalling
Contentful::Asset
objects nested within otherContentful::Entry
objects returned by the gem. Here's some REPL code that should be illustrative:Have you got any recommendations on marshalling these assets, or plans to support it in the future along the lines of #81?
Thanks for your help!
The text was updated successfully, but these errors were encountered: