lib/ddr/utils.rb in ddr-models-1.11.8 vs lib/ddr/utils.rb in ddr-models-1.12.0

- old
+ new

@@ -74,11 +74,11 @@ end # Find an object with a given identifier and return its PID. # Returns the PID if a single object is found. # Returns nil if no object is found. - # Raises Ddr::Error if more than one object is found. + # Raises Ddr::Models::Error if more than one object is found. # Options can be provided to limit the scope of matching objects # model: Will only consider objects of that model # collection: Will only consider objects that either are that collection or which are # direct children of that collection (i.e., effectively searches a collection and its # items for an object with the given identifier) @@ -101,10 +101,10 @@ when 0 nil when 1 pids.first else - raise Ddr::Error, I18n.t('ddr.errors.multiple_object_matches', :criteria => "identifier #{identifier}") + raise Ddr::Models::Error, I18n.t('ddr.errors.multiple_object_matches', :criteria => "identifier #{identifier}") end end # Returns the reflection object for a given model name and relationship name # E.g., relationship_object_reflection("Item", "parent") returns the reflection object for \ No newline at end of file