Class: Locomotive::Wagon::ContentTypeWithOnlyRelationshipsDecorator

Inherits:
ContentTypeDecorator
  • Object
show all
Defined in:
lib/locomotive/wagon/decorators/content_type_decorator.rb

Instance Method Summary collapse

Methods inherited from ContentTypeDecorator

#description, #display_settings, #entry_template, #filter_fields, #group_by, #import_enabled, #initialize, #order_by, #public_submission_accounts, #public_submission_email_attachments, #public_submission_enabled, #public_submission_title_template, #recaptcha_required, #tree_parent_field_name, #with_relationships?

Methods included from ToHashConcern

#prepare_value_for_hash, #to_hash

Constructor Details

This class inherits a constructor from Locomotive::Wagon::ContentTypeDecorator

Instance Method Details

#__attributes__Object



99
100
101
# File 'lib/locomotive/wagon/decorators/content_type_decorator.rb', line 99

def __attributes__
  %i(name slug fields)
end

#fieldsObject



103
104
105
# File 'lib/locomotive/wagon/decorators/content_type_decorator.rb', line 103

def fields
  @fields ||= __getobj__.fields.associations.map { |f| ContentTypeFieldDecorator.new(f) }
end