Ash.Changeset.change_attribute before or after action
I have this in my seeds.exs file:
What I want to do with this is register a new super user, but I don't have and don't want a specific action to create one since I see it as something that only should be done once in the seeds step.
So what I did was create the changeset that will run my action
This works fine, but I get warnings saying that this will stop working in the future:
At the same time, if I change the order and move the
and
What's the correct way to do this?
What I want to do with this is register a new super user, but I don't have and don't want a specific action to create one since I see it as something that only should be done once in the seeds step.
So what I did was create the changeset that will run my action
register_with_password, and then I just manually fill the fields that are missing (confirmed_at and roles in this case).This works fine, but I get warnings saying that this will stop working in the future:
At the same time, if I change the order and move the
change_attribute calls up, then my seeds stop working with the following error:and
What's the correct way to do this?
