You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* first pass at a global resolver registry
* tests
* fix problem with interpreting nested attribute data
* need to register subclasses, too
* raise custom exceptions when failing to resolve models
* fix specs to implement functional around(:context)
* trailing white space
Copy file name to clipboardExpand all lines: lib/config/locales/en.yml
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -680,6 +680,22 @@ en:
680
680
resolution: "The _type field is a reserved one used by Mongoid to determine the
681
681
class for instantiating an object. Please don't save data in this field or ensure
682
682
that any values in this field correspond to valid models."
683
+
unrecognized_model_alias:
684
+
message: "Cannot find any model with type %{model_alias}"
685
+
summary: "A document is trying to load a polymorphic association, but the data refers to a type of object that can't be resolved (%{model_alias}). It might be that you've renamed the target class."
686
+
resolution: "Register the old name as an alias on the refactored target object, using `identify_as`. This will allow Mongoid to find the target type even if the name no longer matches what was stored in the database."
687
+
unrecognized_resolver:
688
+
message: "The model resolver %{resolver} was referenced, but never registered."
689
+
summary: "A polymorphic association has been configured to use a resolver
690
+
named %{resolver}, but that resolver has not yet been registered. This
691
+
might be a typo. Currently registered resolvers are: %{resolvers}."
692
+
resolution: "Register custom resolvers with
693
+
`Mongoid::ModelResolver.register_resolver` before attempting to query
694
+
a polymorphic association."
695
+
unregistered_class:
696
+
message: "The class %{klass} is not registered with the resolver %{resolver}."
697
+
summary: "A polymorphic association using the resolver %{resolver} has tried to link to a model of type %{klass}, but the resolver has no knowledge of any such model. This can happen if the association is configured to use a different resolver than the target mode."
698
+
resolution: "Make sure the target model is registered with the same resolver as the polymorphic association, using `identify_as`."
683
699
unsaved_document:
684
700
message: "Attempted to save %{document} before the parent %{base}."
685
701
summary: "You cannot call create or create! through the
0 commit comments