Ash FrameworkAF
Ash Framework5mo ago
4 replies
Shahryar

How can add an action in Mixin?

Hi sorry, this is my Mixin to create version for my records, how can add an action inside it?
defmodule MishkaCms.Runtime.Resources.Mixins.PagePaperTrailMixin do
  def postgres do
    quote do
      postgres do
        table "page_versions"
        repo MishkaCms.Repo

        references do
          reference :version_source, on_delete: :delete
        end
      end
    end
  end
end


The action i want to add
read :get_any do
   get? true
   multitenancy :bypass
end


Thank you in advance
Solution
yes, that should work
Was this page helpful?