diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index a65fae6b..36a8c580 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -17,7 +17,7 @@ jobs: matrix: otp: ["23", "22"] elixir: ["1.10.0"] - ash: ["master", "1.9", "1.8"] + ash: ["master", "1.10"] env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ASH_CI: true diff --git a/lib/data_layer.ex b/lib/data_layer.ex index 7dd75945..aba7e655 100644 --- a/lib/data_layer.ex +++ b/lib/data_layer.ex @@ -175,7 +175,7 @@ defmodule AshPostgres.DataLayer do end @impl true - def destroy(%resource{} = record) do + def destroy(resource, %{data: record}) do case repo(resource).delete(record) do {:ok, _record} -> :ok {:error, error} -> {:error, error} diff --git a/mix.exs b/mix.exs index 214a1590..09d78472 100644 --- a/mix.exs +++ b/mix.exs @@ -61,7 +61,7 @@ defmodule AshPostgres.MixProject do [ {:ecto_sql, "~> 3.4"}, {:postgrex, ">= 0.0.0"}, - {:ash, ash_version("~> 1.9")}, + {:ash, ash_version("~> 1.10")}, {:git_ops, "~> 2.0.1", only: :dev}, {:ex_doc, "~> 0.22", only: :dev, runtime: false}, {:ex_check, "~> 0.11.0", only: :dev}, diff --git a/mix.lock b/mix.lock index 5ff4a479..6df04517 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,5 @@ %{ - "ash": {:hex, :ash, "1.9.0", "439f17df48c69f9519a9cd83461526645ba0e81741f43fa908b8c610b55be33d", [:mix], [{:ecto, "~> 3.4", [hex: :ecto, repo: "hexpm", optional: false]}, {:ets, "~> 0.8.0", [hex: :ets, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.3.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:picosat_elixir, "~> 0.1.4", [hex: :picosat_elixir, repo: "hexpm", optional: false]}], "hexpm", "8108c6368806e8f1370650401c7263265d5d87cf543586a78333ff4f77784b89"}, + "ash": {:hex, :ash, "1.10.0", "c3b3eb98ac41da14bb70daeec15d498ea48a91105db9386cb2814eaf38ff0cc6", [:mix], [{:ecto, "~> 3.4", [hex: :ecto, repo: "hexpm", optional: false]}, {:ets, "~> 0.8.0", [hex: :ets, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.3.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:picosat_elixir, "~> 0.1.4", [hex: :picosat_elixir, repo: "hexpm", optional: false]}], "hexpm", "2a8babe6cfa9fa0274037074ba4a3c23bda9f45a77006c4e745bc6336629a5d1"}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, "certifi": {:hex, :certifi, "2.5.2", "b7cfeae9d2ed395695dd8201c57a2d019c0c43ecaf8b8bcb9320b40d6662f340", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040"}, "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb30e6625b04a6117c1b2db6ace7d5976", [:mix], [], "hexpm", "4a0850c9be22a43af9920a71ab17c051f5f7d45c209e40269a1938832510e4d9"},