Skip to content

docs: clarify scope doc in Ash.can/can? opts#2633

Merged
zachdaniel merged 1 commit intoash-project:mainfrom
emadshaaban92:can-scope-opt-doc
Mar 12, 2026
Merged

docs: clarify scope doc in Ash.can/can? opts#2633
zachdaniel merged 1 commit intoash-project:mainfrom
emadshaaban92:can-scope-opt-doc

Conversation

@emadshaaban92
Copy link
Contributor

The :scope doc in opts for Ash.can/3 said it would "overwrite any actor, tenant or context provided" which isn't accurate.

Ash.can/3 takes the actor as its second argument (either directly or from that scope, not from opts), tenant from scope is only used as a default (explicit :tenant opt wins), and context is deep merged with explicit :context opt taking precedence.

Updated the doc to reflect that.

Related to #2619 and #2621

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

@zachdaniel zachdaniel merged commit 0cc706b into ash-project:main Mar 12, 2026
45 checks passed
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

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.

2 participants