app/models/item.rb
# unless the item is a link, pdf_destination or a wrap around a medium (self),
# it returns the short reference together with a description
# result might look like this:   "Bem. 29.13 zu freien Moduln"
# in the other cases, it might look like that:
# "KaViaR, Sitzung 27 vom 17.8.2017"  (self)
# "extern Spiegel" (link)
unless the item is a link, pdf_destination or a wrap around a medium (self),
it returns the short reference together with a description
result might look like this:   "Bem.
unless the item is a link pdf_destination or a wrap around a medium ( self ) it returns the short reference together with a description result might look like this : " Bem .
def local_reference
    unless sort.in?(['self', 'link', 'pdf_destination'])
      return short_ref_with_description unless medium&.sort == 'Script'
      return 'Skript, ' + short_ref_with_description
    end
    local_non_math_reference
  end
def local_reference unless sort . in? ( [ 'self' , 'link' , 'pdf_destination' ] ) return short_ref_with_description unless medium &. sort == 'Script' return 'Skript, ' + short_ref_with_description end local_non_math_reference end
unless the item is a link, pdf_destination or a wrap around a medium (self),
it returns the short reference together with a description
result might look like this:   "Bem.
unless the item is a link pdf_destination or a wrap around a medium ( self ) it returns the short reference together with a description result might look like this : " Bem .