You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There's no simple way to copy a value from one attribute to another within the same resource. Current approach is verbose:
change fn changeset, _context ->
Ash.Changeset.change_attribute(changeset, :bar, Ash.Changeset.get_attribute(changeset, :foo))
end
Describe the solution you'd like
resource do
actions do
create :create do
accept [:foo]
change set_attribute(:bar, from: :foo)
end
end
end
Describe alternatives you've considered
Introduce a copy_attribute function for a more declarative syntax:
copy_attribute(:bar, from: :foo)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
There's no simple way to copy a value from one attribute to another within the same resource. Current approach is verbose:
Describe the solution you'd like
Describe alternatives you've considered
Introduce a copy_attribute function for a more declarative syntax:
copy_attribute(:bar, from: :foo)
The text was updated successfully, but these errors were encountered: