Hello!, I need to write a small snippet in ruby to update some contents, is a couple of hours I’m struggling to get the job done! I don’t know what is missing or where I hade the error.
This is the code:
client = Contentful::Management::Client.new(<My Key>) environment = client.environments(<my Space ID).find(<my Environment ID>) url = '<some url>' entry = environment.entries.all('content_type' => 'designers', 'fields.website' => url) entry.items.each do |x| x.fields.update('shopify_entry' => true) x.publish() end
I have no errors, the code is executed and the entry is re-published, however I got no changes.
What I’m missing?, documentation is not very clear or at least I’ve not understood well. I tried to add x.save before x.publish() but nothing changes.
Thanks for you help.