From ac9afafcd912a2d4d4a2ce616d17cd68c9b77d0d Mon Sep 17 00:00:00 2001 From: Guillaume Cugnet <82266037+legrec14@users.noreply.github.com> Date: Wed, 22 May 2024 19:08:22 +0200 Subject: [PATCH] docs: Update project-structure.md (#1196) Seems there were a just a little typo and a lacking `end` word. --- .../topics/development/project-structure.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/documentation/topics/development/project-structure.md b/documentation/topics/development/project-structure.md index 5bf0491cf..942aff142 100644 --- a/documentation/topics/development/project-structure.md +++ b/documentation/topics/development/project-structure.md @@ -77,16 +77,19 @@ But this is putting business logic inside of your UI/representation layer. Inste ```elixir defmodule MyApp.Ticket.FetchIssueInfo do - use Ash.Resource.Changeo + use Ash.Resource.Change def change(changeset, _, _) do Ash.Changeset.before_transaction(changeset, fn changeset -> - issue_info = GithubApi.get_issue(changeset.arguments.issue_id) - - Ash.Changeset.force_change_attributes(changeset, %{issue_info: %{ - title: issue_info.title, - body: issue_info.body - }}) + issue_info = GithubApi.get_issue(changeset.arguments.issue_id) + + Ash.Changeset.force_change_attributes(changeset, %{ + issue_info: %{ + title: issue_info.title, + body: issue_info.body + } + }) + end) end end ```