-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
Don't know what context to use for error when both ORMs #549
Comments
Just hit my head on this as well. I ended up forking the gem and commenting out every line that tested for Mongoid and required in the adapters. The ORM adapters shouldn't be monkey patching the base Context. Context should delegate to an adapter based on the current arguments. |
Duplicate of #499 |
"we need a way to configure or automatically identify the ORM being used for that model and set context appropriately." Thanks @mintuhouse. Closing as this is a duplicate of #499 as you have noted. I believe none of the maintainers use Mongoid, and the PRs adding Mongoid were merged in with the caveat that the community would have to maintain that addition. In other words: Pull requests are welcome 😃 |
Fixed with #541. |
We use both ActiveRecord and Mongoid in our project. When I try to run
Admin.ransack
or any model.ransack, I get "Don't know what context to use for Admin" error.May be in context.rb, we need a way to configure or automatically identify the ORM being used for that model and set context appropriately.
The text was updated successfully, but these errors were encountered: