Class: Promethee::StructureUpgrader::Components::Image

Inherits:
Base
  • Object
show all
Defined in:
app/services/promethee/structure_upgrader/components/image.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #upgrade, #upgraded_data

Constructor Details

This class inherits a constructor from Promethee::StructureUpgrader::Components::Base

Instance Method Details

#upgraded_attributesObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'app/services/promethee/structure_upgrader/components/image.rb', line 19

def upgraded_attributes
  {
    'image' => {
      'searchable' => false,
      'translatable' => false,
      'type' => 'blob',
      value: attribute('image')
    },
    'alt' => {
      'searchable' => true,
      'translatable' => true,
      'type' => 'string',
      'value' => string_attribute('searchable_alt')
    },
    'caption' => {
      'searchable' => true,
      'translatable' => true,
      'type' => 'string',
      'value' => string_attribute('searchable_caption')
    }
  }
end