Module: Iron::FieldDefinition::Exportable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Iron::FieldDefinition
- Defined in:
- app/models/iron/field_definition/exportable.rb
Instance Method Summary collapse
Instance Method Details
#export_attributes ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/models/iron/field_definition/exportable.rb', line 5 def export_attributes { handle:, name:, type: type_handle, rank:, metadata: }.tap do |attrs| if respond_to?(:supported_block_definitions) attrs[:supported_block_definitions] = supported_block_definitions.pluck(:handle) end if respond_to?(:supported_content_types) attrs[:supported_content_types] = supported_content_types.pluck(:handle) end end.compact_blank end |