app/operations/harvesting/entities/upsert.rb
# Used by {#scope_for} to derive the right scope based on the provided model.
#
# @param [ActiveRecord::Base] model
# @return [:collection, :item]
Used by {#scope_for} to derive the right scope based on the provided model.
Used by { #scope_for } to derive the right scope based on the provided model .
def type_for(model)
        case model
        when ::Collection
          Success :collection
        when ::Item
          Success :item
        when ::SchemaVersion
          type_from_version model
        when ::HarvestEntity
          type_from_harvest_entity model
        else
          Failure[:unknown_type, "Cannot derive entity type from #{model.inspect}"]
        end
      end
def type_for ( model ) case model when :: Collection Success :collection when :: Item Success :item when :: SchemaVersion type_from_version model when :: HarvestEntity type_from_harvest_entity model else Failure [ :unknown_type , "Cannot derive entity type from #{model.inspect}" ] end end
Used by {#scope_for} to derive the right scope based on the provided model.
Used by { #scope_for } to derive the right scope based on the provided model .
# :nocov: # :nocov:
None
:collection, :item
model
None