Skip to content

Commit

Permalink
docs: Update project-structure.md (#1196)
Browse files Browse the repository at this point in the history
Seems there were a just a little typo and a lacking `end` word.
  • Loading branch information
gcugnet authored May 22, 2024
1 parent 05379e1 commit ac9afaf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions documentation/topics/development/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit ac9afaf

Please sign in to comment.