jhund / filterrific

Filterrific is a Rails Engine plugin that makes it easy to filter, search, and sort your ActiveRecord lists.
http://filterrific.clearcove.ca
MIT License
910 stars 124 forks source link

Passing filtered results (rows, ids) to another not index/listing related controller's action #148

Closed acrolink closed 6 years ago

acrolink commented 6 years ago

Let's say a user filters some listing by filterrific filters and narrows the result set from 2,000 to 500 rows. How to get this filtered set of 500 records (row data, database ids) and use it within a custom back-end controller action (for example, on button click send emails to the people associated with those 500 rows). How to access the active filtered result set from another controller's action? Thank you.

jhund commented 6 years ago

@acrolink you can store the filterrific params in the session, and then load them in the other controller by using the same persistence_id you used in the controller where you set the filter params.