contentful / contentful_model

A lightweight wrapper around the Contentful api gem, to make it behave more like ActiveRecord
MIT License
44 stars 42 forks source link

How to update an association when empty? #140

Closed bhtabor closed 4 years ago

bhtabor commented 4 years ago

The README has a section on fetching associations (https://github.com/contentful/contentful_model#associations) and updating content (https://github.com/contentful/contentful_model#updating-content). But, it is not clear how we update associations when references are empty. Can it be done with contentful_model or should we use contentful_management?

Apparently, reference field setters are not available when associations are empty. Somehow related to https://github.com/contentful/contentful.rb/issues/190