Skip to content

read_action option not used #20

@enoonan

Description

@enoonan

When configuring a read_action in a LiveResource, the adapter appears to ignore it and always use the primary :read action instead.

Steps to Reproduce

  1. Configure a resource with a primary read action that has a filter:
  # In the Ash resource
  actions do
    read :read do
      primary? true
      filter expr(is_nil(archived_at))
    end

    read :read_all  # No filter, includes archived
  end
  1. Configure the LiveResource to use read_all:
  defmodule MyApp.RuleLive do
    use AshBackpex.LiveResource

    backpex do
      resource MyApp.Rule
      read_action :read_all  # Should include archived records
      # ...
    end
  end
  1. Archive a record (set archived_at)
  2. View the Backpex index - the archived record is not displayed

Expected Behavior

The read_action :read_all should be used, showing all records including archived ones.

Actual Behavior

The primary :read action is used instead, filtering out archived records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions