app/models/record_revision.rb
# ====Params
# string concept_id,
# ====Returns
# data_type || nil
# ==== Method
# Checks if the data type is a collection or granule based on concept id
# will return nil if no concept id is provided
Params
string concept_id,
Returns
data_type || nil
Method
Checks if the data type is a collection or granule based on concept id
will return nil if no concept id is provided
Params string concept_id Returns data_type || nil Method Checks if the data type is a collection or granule based on concept id will return nil if no concept id is provided
def find_type(concept_id)
    type = nil
    if !concept_id.eql? ""
      if concept_id[0].downcase.eql? "c"
        type = Collection
      elsif concept_id[0].downcase.eql? "g"
        type = Granule
      end
    end
  end
def find_type ( concept_id ) type = nil if ! concept_id . eql? "" if concept_id [ 0 ] . downcase . eql? "c" type = Collection elsif concept_id [ 0 ] . downcase . eql? "g" type = Granule end end end
Params
string concept_id,
Returns
data_type || nil
 Method
Checks if the data type is a collection or granule based on concept id
will return nil if no concept id is provided
Params string concept_id Returns data_type || nil Method Checks if the data type is a collection or granule based on concept id will return nil if no concept id is provided
concept_id
<not_specific>