Sha256: fc655f37a241f2698757ebfd40b74d9280c83ba9fa112060c9f30f51676c6534

Contents?: true

Size: 506 Bytes

Versions: 9

Compression:

Stored size: 506 Bytes

Contents

require 'active_fedora/noid'

module Hyrax
  module Noid
    extend ActiveSupport::Concern

    ## This overrides the default behavior, which is to ask Fedora for an id
    # @see ActiveFedora::Persistence.assign_id
    def assign_id
      service.mint if Hyrax.config.enable_noids?
    end

    # @todo Do we need this here? I'm a bit surprised to see it here [JNF]
    def to_param
      id
    end

    private

      def service
        @service ||= ActiveFedora::Noid::Service.new
      end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyrax-1.1.1 app/services/hyrax/noid.rb
hyrax-1.1.0 app/services/hyrax/noid.rb
hyrax-1.0.5 app/services/hyrax/noid.rb
hyrax-1.0.4 app/services/hyrax/noid.rb
hyrax-1.0.3 app/services/hyrax/noid.rb
hyrax-1.0.2 app/services/hyrax/noid.rb
hyrax-1.0.1 app/services/hyrax/noid.rb
hyrax-1.0.0.rc2 app/services/hyrax/noid.rb
hyrax-1.0.0.rc1 app/services/hyrax/noid.rb