Sha256: db6f28613896b01a36c80289529225cbcfed461cec6a181a9c204e7eb5ba1b01

Contents?: true

Size: 306 Bytes

Versions: 6

Compression:

Stored size: 306 Bytes

Contents

# frozen_string_literal: true

# rubocop:disable Style/ClassAndModuleChildren
class Maglev::SettingTypes::CollectionItem < Maglev::SettingTypes::Base
  def cast_value(value)
    if value.is_a?(String)
      { id: value }
    else
      value
    end
  end
end
# rubocop:enable Style/ClassAndModuleChildren

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
maglevcms-1.7.3 app/models/maglev/setting_types/collection_item.rb
maglevcms-1.7.2 app/models/maglev/setting_types/collection_item.rb
maglevcms-1.7.1 app/models/maglev/setting_types/collection_item.rb
maglevcms-1.7.0 app/models/maglev/setting_types/collection_item.rb
maglevcms-1.6.1 app/models/maglev/setting_types/collection_item.rb
maglevcms-1.6.0 app/models/maglev/setting_types/collection_item.rb