Skip to content
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

Ransack no longer works with Secondbase gem. #881

Closed
lcpriest opened this issue Feb 13, 2018 · 3 comments · Fixed by #893
Closed

Ransack no longer works with Secondbase gem. #881

lcpriest opened this issue Feb 13, 2018 · 3 comments · Fixed by #893

Comments

@lcpriest
Copy link

I opened an issue on Secondbase here: customink/secondbase#56.

It looks like moving from @engine.connection.schema_cache to ::ActiveRecord::Base.connection.schema_cache will exclude tables provided in a secondary schema.

I was using Ransack with ActiveAdmin and Secondbase (to have an admin interface for my Rails app in another app, but share some parts of a database).
Ruby 2.5.0
Rails 5.1.4
Ransack 1.8.7

I understand if this is may not be an urgent/relevant issue.
The commit that added the change is
d445755.
I would love to understand what changes in Rails 5.2 it is adapting to, so that I can try submit another solution that will allow gems such as Secondbase to continue to work with Ransack.

If I have missed anything, please let me know and I am happy to add it.

@scarroll32
Copy link
Member

Hi @varyonic, regarding this issue. Is there any reason we can't use @engine instead of ::ActiveRecord::Base. It looks like we are already using @engine in the same class.

Let me know, and I'll look after the changes.

@varyonic
Copy link
Contributor

I was building on the contribution by @bbonislawski, my guess is the change was not intentional.

@varyonic
Copy link
Contributor

I tried changing it back to @engine and the tests failed. It's going to need someone more motivated than me to fix this use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants