Sha256: aeec05c44e7b0ac337b1e40bf3eb01b9e36aefb70f9ebadab5a0d41138c351be

Contents?: true

Size: 233 Bytes

Versions: 27

Compression:

Stored size: 233 Bytes

Contents

module CurationConcerns
  module Serializers
    def to_s
      if title.present?
        Array(title).join(' | ')
      elsif label.present?
        Array(label).join(' | ')
      else
        'No Title'
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
curation_concerns-models-0.8.0 app/models/concerns/curation_concerns/serializers.rb
curation_concerns-models-0.7.0 app/models/concerns/curation_concerns/serializers.rb
curation_concerns-models-0.6.0 app/models/concerns/curation_concerns/serializers.rb
curation_concerns-models-0.5.0 app/models/concerns/curation_concerns/serializers.rb
curation_concerns-models-0.4.0 app/models/concerns/curation_concerns/serializers.rb
curation_concerns-models-0.3.0 app/models/concerns/curation_concerns/serializers.rb
curation_concerns-models-0.2.0 app/models/concerns/curation_concerns/serializers.rb