-
Notifications
You must be signed in to change notification settings - Fork 56
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
Anonymous subclass of ActiveRecord::Base causes exception #90
Comments
Why not to use SomeAnonymousModel = Class.new(ActiveRecord::Base) ? This is not a trivial error to fix in |
Hi @fatkodima, The classes are defined in a test, and it isn't otherwise necessary to explicitly name the class (we are using RSpec and generating the subclass in a Is there any other reason to explicitly require |
Ah, ok, you're right 👍 |
Before merging the corresponding PR, I'd like to understand your situation better, @owst. My initial reaction is we shouldn't make I'd like to understand your use case better: why do you call |
@owst, let me know what you think about the above. |
Hi @gregnavis - Apologies for the massive amount of time that's passed on this issue without reply. Our reason for calling However, upon reflection, since it's not a supported setup and somewhat unusual, I'm happy just close this issue and pay the cost an additional time in our CI pipeline. Thanks |
As part of our test suite we run ActiveRecordDoctor and also create anonymous subclasses of
ActiveRecord::Base
- the latter causes an exception in the formerhere's a simple reproduction script:
The text was updated successfully, but these errors were encountered: