app/models/concerns/shared/identifiers.rb
# Exact match on the full identifier (use for any class of identifiers)
# 'value' is the cached value with includes the namespace (see spec)
# example Serial.with_identifier('MX serial ID 8740')
Exact match on the full identifier (use for any class of identifiers)
'value' is the cached value with includes the namespace
example Serial.with_identifier('MX serial ID 8740')
Exact match on the full identifier ( use for any class of identifiers ) ' value ' is the cached value with includes the namespace example Serial . with_identifier ( ' MX serial ID 8740 ' )
def with_identifier(value)
      value = [value] if value.class == String
      t = Identifier.arel_table
      a = t[:cached].eq_any(value)
      self.joins(:identifiers).where(a.to_sql).references(:identifiers)
    end
def with_identifier ( value ) value = [ value ] if value . class == String t = Identifier . arel_table a = t [ :cached ] . eq_any ( value ) self . joins ( :identifiers ) . where ( a . to_sql ) . references ( :identifiers ) end
Exact match on the full identifier (use for any class of identifiers)
'value' is the cached value with includes the namespace (see spec)
example Serial.with_identifier('MX serial ID 8740')
Exact match on the full identifier ( use for any class of identifiers ) ' value ' is the cached value with includes the namespace ( see spec ) example Serial . with_identifier ( ' MX serial ID 8740 ' )
value
<not_specific>