Working with AshArchival
I'd like to to implement a filter that allows the user to read their archived records. I'm trying this:
But for some reason I get no results
I tried the
exclude_read_actions
option
But still get no results for my action
I do get the results when I try to read unarchived records though
Note: I'm not using the base_filter
Solution:Jump to solution
So if you make like an
:include_archived
action for example, exclude that action in the ash archival DSL, you can then pass action: :include_archived
to Ash.read
5 Replies
That
:list_contacts
action isn't the one doing the filtering
its whatever read action your generic action calls on the inside that is doing the filteringMm this is my implementation
I'm guessing there is an option I need to pass to the
Ash.read\2
call there?By default
Ash.read
uses the primary read action (if given a query that is not already built for a specific action)Solution
So if you make like an
:include_archived
action for example, exclude that action in the ash archival DSL, you can then pass action: :include_archived
to Ash.read
Nice, that works, thanks!