-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't seem to use type as a property name #92
Comments
ooo .. that is kind of a weak point. I was hoping no one would use that as an attribute ( like with rails where they reserve that property name 'type' for use when using polymorphic models. |
I'll see what I can do about changing it. In the meantime, hopefully you can come up with a solution :) |
@visoft ... there is a solution ( 99% sure ) , but it means you would flag that there are no polymorphic relationships on your models. where you can set a flag in the test environment that looks something like ENV.APP.FACTORY_GUY_NO_POLYMORPHIC_MODELS = true Let me know if that would work for you. |
That would work awesome. |
Version 1.1.0 fixes this issue, and no funny business needed ( ENV.APP.FACTORY_GUY_NO_POLYMORPHIC_MODELS ) just works as is. Thanks for pushing me to fix this @visoft , because it showed me a flaw in my model definitions. |
My model has a string property called
type
, however when usingmake
and passing in{ type: 'foo' }
, I get "Error: No model was found for 'foo'". Is there a workaround to this?The text was updated successfully, but these errors were encountered: