lib/hyrax/resource_name.rb in hyrax-3.0.1 vs lib/hyrax/resource_name.rb in hyrax-3.0.2

- old
+ new

@@ -5,9 +5,10 @@ # A custom name for Valkyrie Resource objects. Route keys for resources may # not be the same as the model name. class ResourceName < Name def initialize(klass, namespace = nil, name = nil) super + return unless defined?(Wings::ModelRegistry) legacy_model = Wings::ModelRegistry.lookup(klass) return unless legacy_model @route_key = legacy_model.model_name.route_key