Sha256: 2c09158df1c5e9eb8e0c9e26fc97ac65b9620eaaacd046c3a44992d10a9dad51
Contents?: true
Size: 539 Bytes
Versions: 11
Compression:
Stored size: 539 Bytes
Contents
# frozen_string_literal: true # rubocop:disable Style/ClassAndModuleChildren module Maglev::GetPageSections::TransformCollectionItemConcern def transform_collection_item_content_setting(content, setting) item_id = content.dig('value', 'id') return if item_id.blank? item = fetch_collection_items.call( collection_id: setting.options[:collection_id], id: item_id ) content['value']['label'] = item.label content['value']['item'] = item.source end end # rubocop:enable Style/ClassAndModuleChildren
Version data entries
11 entries across 11 versions & 1 rubygems