improvement: Add Ash.Subject to abstract Changeset, Query, ActionInput common functions#2212
Merged
zachdaniel merged 3 commits intoash-project:mainfrom Jul 21, 2025
Merged
Conversation
b7f3967 to
7469bb1
Compare
7469bb1 to
24a5b58
Compare
zachdaniel
reviewed
Jul 20, 2025
zachdaniel
reviewed
Jul 20, 2025
zachdaniel
reviewed
Jul 20, 2025
zachdaniel
reviewed
Jul 20, 2025
- Remove `set_actor`, `set_tenant`, `set_tracer`, `set_authorize?` - Remove `set_result` and `clear_result` until `ActionInput` supports it
Contributor
Author
|
Addressed all the feedback items |
- Remove path optional argument
8e750f7 to
7fe19a7
Compare
Contributor
Author
|
Fixed the dialyzer issue for |
Contributor
Author
|
I went ahead and added |
zachdaniel
reviewed
Jul 21, 2025
66aaa7e to
7fe19a7
Compare
zachdaniel
approved these changes
Jul 21, 2025
Contributor
|
🚀 Thank you for your contribution! 🚀 |
Contributor
|
Awesome 😄 PRing the usage of this to the builtin preparations, validations, and changes would be amazing ❤️ |
Contributor
Author
I'll work on that this week and get it submitted. |
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
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.
Contributor checklist
Leave anything that you believe does not apply unchecked.
Adds
Ash.Subjectto help abstract common functionality betweenChangeset,Query, andActionInput. Most functions act as a router to the subject's corresponding function. For any functions that seemed to have generic implementations, I moved those into Ash.Subject directly.No changes have been made to
Changeset,Query, orActionInput. This PR only addsAsh.Subjectso it can be used when refactoring other functionality that has to pattern match on the subject type.Let me know if any changes are needed.
Future PRs will aim to refactor modules that are currently pattern matching on subject type to call the common functions and eventually pull out the logic from the subject type modules into
Ash.Subjectso it's all centralized.