Sha256: b12fce1a645f551270797846360cebf8ea41bfd1902837c0a1d08fcbfe84ccc5

Contents?: true

Size: 319 Bytes

Versions: 8

Compression:

Stored size: 319 Bytes

Contents

module Sufia
  module ModelMethods
    extend ActiveSupport::Concern

    included do
      include Hydra::WithDepositor
    end

    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

8 entries across 8 versions & 2 rubygems

Version Path
sufia-models-6.2.0 app/models/concerns/sufia/model_methods.rb
sufia-models-6.1.0 app/models/concerns/sufia/model_methods.rb
sufia-models-6.0.0 app/models/concerns/sufia/model_methods.rb
sufia-6.0.0 sufia-models/app/models/concerns/sufia/model_methods.rb
sufia-6.0.0.rc4 sufia-models/app/models/concerns/sufia/model_methods.rb
sufia-models-6.0.0.rc4 app/models/concerns/sufia/model_methods.rb
sufia-6.0.0.rc3 sufia-models/app/models/concerns/sufia/model_methods.rb
sufia-models-6.0.0.rc3 app/models/concerns/sufia/model_methods.rb