We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code in the documentation for Contexts under Strategies for cross-context workflows possibly outdated.
Was getting a failing test case at the latter part of the doc, the one with the Multi implementation.
Error: ** (FunctionClauseError) no function clause matching in Ecto.Multi.run/3
I checked the Multi.run doc and it says
receives the repo as the first argument, and the changes so far as the second argument
I updated the run code to Multi.run(:user, fn _, _ -> Accounts.create_user(params) end) and it works.
Multi.run(:user, fn _, _ -> Accounts.create_user(params) end)
def register_account(attrs) do Multi.new() |> Multi.run(:account, fn _, _ -> IO.puts "do something here" end) end
def register_account(attrs) do Multi.new() |> Multi.run(:account, fn _ -> IO.puts "do something here" end) end
Thank you!
The text was updated successfully, but these errors were encountered:
Good catch. Passing a 1-arity function to Multi.run was deprecated in Ecto 3.0 and removed in Ecto 3.1.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Environment
Code in the documentation for Contexts under Strategies for cross-context workflows possibly outdated.
Was getting a failing test case at the latter part of the doc, the one with the Multi implementation.
Error:
** (FunctionClauseError) no function clause matching in Ecto.Multi.run/3
I checked the Multi.run doc and it says
I updated the run code to
Multi.run(:user, fn _, _ -> Accounts.create_user(params) end)
and it works.
Expected behavior
Actual behavior
Thank you!
The text was updated successfully, but these errors were encountered: