I have an update action that interpolates some string attributes with an accepted id that’s an integer:
update :open do
require_atomic? false
atomic_upgrade? false
accept [:*]
change fn changeset, _ ->
string_attribute_a = "A.#{changeset.attributes.some_integer_id}"
string_attribute_b= "B.#{changeset.attributes.some_integer_id}"
change_attributes(changeset, %{string_attribute_a: string_attribute_a , string_attribute_b: string_attribute_b})
end
end
This works but I failed to do it atomically. Is this something that’s not possible or am I missing something? I’m wondering @zachdaniel how would you do this better?