Sha256: 22075d88464eb77ad7f41433df64edc1b70f8d6deb9860db9e0a45bc561d3fc6

Contents?: true

Size: 251 Bytes

Versions: 29

Compression:

Stored size: 251 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Serializers
    def to_s
      if title.present?
        title.join(' | ')
      elsif label.present?
        label
      else
        I18n.t('hyrax.works.missing_title')
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.4 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.3 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.2 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.1 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.0 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.0.rc3 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.0.rc2 app/models/concerns/hyrax/serializers.rb
hyrax-5.0.0.rc1 app/models/concerns/hyrax/serializers.rb
hyrax-3.6.0 app/models/concerns/hyrax/serializers.rb
hyrax-4.0.0 app/models/concerns/hyrax/serializers.rb
hyrax-4.0.0.rc3 app/models/concerns/hyrax/serializers.rb
hyrax-4.0.0.rc2 app/models/concerns/hyrax/serializers.rb
hyrax-4.0.0.rc1 app/models/concerns/hyrax/serializers.rb
hyrax-3.5.0 app/models/concerns/hyrax/serializers.rb
hyrax-4.0.0.beta2 app/models/concerns/hyrax/serializers.rb
hyrax-3.4.2 app/models/concerns/hyrax/serializers.rb
hyrax-4.0.0.beta1 app/models/concerns/hyrax/serializers.rb
hyrax-3.4.1 app/models/concerns/hyrax/serializers.rb
hyrax-3.4.0 app/models/concerns/hyrax/serializers.rb