Module: Ecoportal::API::Common::Content::CollectionModel::Modifiers::ItemsKey::ClassMethods

Defined in:
lib/ecoportal/api/common/content/collection_model/modifiers/items_key.rb

Instance Method Summary collapse

Instance Method Details

#items_keyObject

The attr that has been defined as passkey in the item class



20
21
22
# File 'lib/ecoportal/api/common/content/collection_model/modifiers/items_key.rb', line 20

def items_key
  @items_key ||= 'id'
end

#items_key=(value) ⇒ Object



24
25
26
# File 'lib/ecoportal/api/common/content/collection_model/modifiers/items_key.rb', line 24

def items_key=(value)
  @items_key = value && value.to_s.freeze
end