Sha256: a1d6b6ed0cce99361b5ed2cde5ae8005f9838575627b05f5cac1c28235daea6f

Contents?: true

Size: 488 Bytes

Versions: 56

Compression:

Stored size: 488 Bytes

Contents

require_dependency 'hyrax/name'
module Hyrax
  module Naming
    extend ActiveSupport::Concern

    module ClassMethods
      # Override of ActiveModel::Model name that allows us to use our custom name class
      def model_name
        @_model_name ||= begin
          namespace = parents.detect do |n|
            n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
          end
          Hyrax::Name.new(self, namespace)
        end
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/models/concerns/hyrax/naming.rb
hyrax-2.9.5 app/models/concerns/hyrax/naming.rb
hyrax-2.9.4 app/models/concerns/hyrax/naming.rb
hyrax-2.9.3 app/models/concerns/hyrax/naming.rb
hyrax-2.9.2 app/models/concerns/hyrax/naming.rb
hyrax-2.9.1 app/models/concerns/hyrax/naming.rb
hyrax-2.9.0 app/models/concerns/hyrax/naming.rb
hyrax-2.8.0 app/models/concerns/hyrax/naming.rb
hyrax-2.7.2 app/models/concerns/hyrax/naming.rb
hyrax-2.7.1 app/models/concerns/hyrax/naming.rb
hyrax-2.7.0 app/models/concerns/hyrax/naming.rb
hyrax-2.6.0 app/models/concerns/hyrax/naming.rb
hyrax-3.0.0.pre.rc1 app/models/concerns/hyrax/naming.rb
hyrax-3.0.0.pre.beta3 app/models/concerns/hyrax/naming.rb
hyrax-2.5.1 app/models/concerns/hyrax/naming.rb
hyrax-2.5.0 app/models/concerns/hyrax/naming.rb
hyrax-3.0.0.pre.beta2 app/models/concerns/hyrax/naming.rb
hyrax-2.4.1 app/models/concerns/hyrax/naming.rb
hyrax-3.0.0.pre.beta1 app/models/concerns/hyrax/naming.rb
hyrax-2.4.0 app/models/concerns/hyrax/naming.rb