def seed_container_block_content(locale, seed_content)
      page_part_editor_setup = page_part.editor_setup
      raise "Invalid editorBlocks for page_part_editor_setup" unless page_part_editor_setup && page_part_editor_setup["editorBlocks"].present?
      # page = page_part.page
      # page_part_key uniquely identifies a fragment
      # page_part_key = page_part.page_part_key

      # container for json to be attached to page details
      locale_block_content_json = {"blocks" => {}}
      # {"blocks"=>{"title_a"=>{"content"=>"about our agency"}, "content_a"=>{"content"=>""}}}
      page_part_editor_setup["editorBlocks"].each do |configColBlocks|
        configColBlocks.each do |configRowBlock|
          row_block_label = configRowBlock["label"]
          row_block_content = ""
          # find the content for current block from within the seed content
          if seed_content[row_block_label]
            if configRowBlock["isImage"]
              photo = seed_fragment_photo row_block_label, seed_content[row_block_label]
              if photo.present? && photo.optimized_image_url.present?
                # optimized_image_url is defined in content_photo and will
                # return cloudinary url or filesystem url depending on settings
                row_block_content = photo.optimized_image_url
              else
                row_block_content = "http://via.placeholder.com/350x250"
              end
            else
              row_block_content = seed_content[row_block_label]
            end
          end
          locale_block_content_json["blocks"][row_block_label] = {"content" => row_block_content}
        end
      end
      # # save the block contents (in associated page_part model)
      # updated_details = container.set_page_part_block_contents page_part_key, locale, locale_block_content_json
      # # retrieve the contents saved above and use to rebuild html for that page_part
      # # (and save it in associated page_content model)
      # fragment_html = container.rebuild_page_content page_part_key, locale

      update_page_part_content locale, locale_block_content_json

      p " #{page_part_key} content set for #{locale}."
    end
def seed_container_block_content(locale, seed_content)
      page_part_editor_setup = page_part.editor_setup
      raise "Invalid editorBlocks for page_part_editor_setup" unless page_part_editor_setup && page_part_editor_setup["editorBlocks"].present?
      # page = page_part.page
      # page_part_key uniquely identifies a fragment
      # page_part_key = page_part.page_part_key

      # container for json to be attached to page details
      locale_block_content_json = {"blocks" => {}}
      # {"blocks"=>{"title_a"=>{"content"=>"about our agency"}, "content_a"=>{"content"=>""}}}
      page_part_editor_setup["editorBlocks"].each do |configColBlocks|
        configColBlocks.each do |configRowBlock|
          row_block_label = configRowBlock["label"]
          row_block_content = ""
          # find the content for current block from within the seed content
          if seed_content[row_block_label]
            if configRowBlock["isImage"]
              photo = seed_fragment_photo row_block_label, seed_content[row_block_label]
              if photo.present? && photo.optimized_image_url.present?
                # optimized_image_url is defined in content_photo and will
                # return cloudinary url or filesystem url depending on settings
                row_block_content = photo.optimized_image_url
              else
                row_block_content = "http://via.placeholder.com/350x250"
              end
            else
              row_block_content = seed_content[row_block_label]
            end
          end
          locale_block_content_json["blocks"][row_block_label] = {"content" => row_block_content}
        end
      end
      # # save the block contents (in associated page_part model)
      # updated_details = container.set_page_part_block_contents page_part_key, locale, locale_block_content_json
      # # retrieve the contents saved above and use to rebuild html for that page_part
      # # (and save it in associated page_content model)
      # fragment_html = container.rebuild_page_content page_part_key, locale

      update_page_part_content locale, locale_block_content_json

      p " #{page_part_key} content set for #{locale}."
    end
seed_content is ...