Sha256: 11b4614f692511c6aabeb4f73b5ed6424a34a0882107ceba1280c0b2d690fda7

Contents?: true

Size: 318 Bytes

Versions: 6

Compression:

Stored size: 318 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

6 entries across 6 versions & 1 rubygems

Version Path
sufia-models-6.7.0 app/models/concerns/sufia/model_methods.rb
sufia-models-6.6.1 app/models/concerns/sufia/model_methods.rb
sufia-models-6.6.0 app/models/concerns/sufia/model_methods.rb
sufia-models-6.5.0 app/models/concerns/sufia/model_methods.rb
sufia-models-6.4.0 app/models/concerns/sufia/model_methods.rb
sufia-models-6.3.0 app/models/concerns/sufia/model_methods.rb