forked from activerecord-hackery/ransack
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix inverts search, when have additional conditions in scope (like de… #3
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
Open
le0pard
wants to merge
18
commits into
main
Choose a base branch
from
fix_not_search
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…#1545) * Rails 7.2.2.1 doesn't need 7.2 join association * drop Rails 6 support * drop Rails 7.0 support * update changelog
Updating docs for required allowlists in v4.0
… conditions (activerecord-hackery#1543) * Raise Ransack::InvalidSearchError instead of ArgumentError on unknown conditions * Update CHANGELOG
Co-authored-by: Greg Molnar <gregmolnar@users.noreply.github.com>
* Wrap Polyamorous module in on_load(:active_record) * Remove defined? ActiveRecord check from form builder * Require ActiveSupport.on_load explicitly * Load ransack first in specs to expose load order issues * Requiring more pieces of ActiveSupport I am not sure whether going down this path is the best approach. I feel that perhaps ActiveSupport could require everything within active_support/core_ext to ensure that active_support/core_ext can load itself. Still, there's no changing old versions of Rails, so I suppose this solution works? I am also not sure what the Rails team would recommend when it comes to requiring specific pieces of ActiveSupport (to leverage things like mattr_accessor). In any case, I was able to reproduce the CI failures locally and these changes make everything pass for me locally. --------- Co-authored-by: Sean <sean@immersive-app.com> Co-authored-by: Greg Molnar <gregmolnar@users.noreply.github.com>
Co-authored-by: Matheus Oliveira <matheussilvasantos@proton.me>
The casting of condition values is incorrect for enums. The value is a number but enum type under the hood (DB) is an integer, so the string values get casted to zero. Apparently this casting is not actually needed (except for converting dates) because ActiveRecord handles this just fine internally. So I removed it and it seems to fix enums and does not make any specs fail. Co-authored-by: Peko <91131029+pekopekopekopayo@users.noreply.github.com>
) Ensure malformed or malicious user input doesn't crash the Rails page. Previously, when a user submits a non-empty array, it would raise the exception: ``` NoMethodError: undefined method 'to_i' for an instance of Array ``` Fixes activerecord-hackery#1556
Co-authored-by: Sean <sean@immersive-app.com>
Co-authored-by: Sean <sean@immersive-app.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…fault_scope)