-
Type:
Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Perhaps the following change to automatically create a class including MongoId::Document would be a reasonable alternative to the above issue?
mongoid-2.4.4/lib/mongoid/relations/metadata.rb:
def klass begin @klass||= class_name.constantize rescue NameError => e c = Class.new do include Mongoid::Document end Kernel.const_set class_name, c @klass= class_name.constantize end @klass end