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

Allow disabling auto extending ActiveRecord::Base #1241

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ur5us
Copy link

@ur5us ur5us commented Jan 25, 2023

Method names like .search can collide with existing scopes which then results in the following error:

You tried to define a scope named "search" on the model "…", but Active
Record already defined a class method with the same name.

With that setting being set to false it allows one to enable ThinkingSphinx per model instead of globally.

Method names like `.search` can collide with existing scopes which then
results in the following error:

```
You tried to define a scope named "search" on the model "…", but Active
Record already defined a class method with the same name.
```

With that setting being set to `false` it allows one to enable
ThinkingSphinx per model instead of globally.
@ur5us
Copy link
Author

ur5us commented Jan 25, 2023

@pat It’s been a long time that we’ve chatted about this in the RubyNZ Slack. Anyway, I’m curious whether you’d be open to this type of feature? For the moment there are no tests as I’m testing the waters. Moreover, not entirely sure how to approach testing other than creating another test app and then testing for the absence of methods on ActiveRecord::Base.

@pat
Copy link
Owner

pat commented Jan 25, 2023

Hi @ur5us :) Very happy to have this feature, though yes, it's a hard thing to test. If you could try it out with a test app that'd be a great place to start - not sure we can do much more than that.

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 this pull request may close these issues.

None yet

2 participants