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
- 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
- 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
- Archive a record (set archived_at)
- 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.
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
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.