def update_contents(contents_attributes)
      return true if contents_attributes.nil?
      contents.each do |content|
        content_hash = contents_attributes[content.id.to_s] || next
        content.update_essence(content_hash) || errors.add(:base, :essence_validation_failed)
      end
      errors.blank?
    end
def update_contents(contents_attributes)
      return true if contents_attributes.nil?
      contents.each do |content|
        content_hash = contents_attributes[content.id.to_s] || next
        content.update_essence(content_hash) || errors.add(:base, :essence_validation_failed)
      end
      errors.blank?
    end
Updates all related contents by calling +update_essence+ on each of them.

 @param contents_attributes [Hash]
   Hash of contents attributes.
   The keys has to be the #id of the content to update.
   The values a Hash of attribute names and values

 @return [Boolean]
   True if +errors+ are blank or +contents_attributes+ hash is nil

 == Example

   @element.update_contents(
     "1" => {ingredient: "Title"},
     "2" => {link: "https://google.com"}
   )