Skip to content

Issue #1472 suggested fix#1474

Merged
scarroll32 merged 7 commits intoactiverecord-hackery:mainfrom
abMatGit:main
Sep 24, 2025
Merged

Issue #1472 suggested fix#1474
scarroll32 merged 7 commits intoactiverecord-hackery:mainfrom
abMatGit:main

Conversation

@abMatGit
Copy link
Copy Markdown
Contributor

@abMatGit abMatGit commented Jan 9, 2024

Related to: #1472

This will allow developers to allowlist ransackable_scopes ahead of regular non-allowlisted attributed ransack searches. This helps avoid needing to monkey patch gem-related models and give developers explicit ability to say "this is scope is good".

@scarroll32 scarroll32 requested a review from Copilot September 24, 2025 18:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reorders the conditional checks in the method_missing method to prioritize allowlisted ransackable_scopes over regular attribute methods, addressing issue #1472. This change allows developers to explicitly allowlist scopes without needing to monkey patch gem-related models.

  • Reordered conditional logic to check ransackable_scope? before attribute_method?
  • Maintained existing functionality while changing execution priority

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@scarroll32 scarroll32 enabled auto-merge (squash) September 24, 2025 19:55
@scarroll32 scarroll32 merged commit dcb57c5 into activerecord-hackery:main Sep 24, 2025
18 of 24 checks passed
scarroll32 added a commit that referenced this pull request Sep 24, 2025
scarroll32 added a commit that referenced this pull request Sep 24, 2025
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.

3 participants