Skip to content

Instantly share code, notes, and snippets.

View tlueker's full-sized avatar

Tom Lueker tlueker

  • Williamsburg, VA
View GitHub Profile
@tinynumbers
tinynumbers / active_admin.rb
Last active April 21, 2024 08:57
ActiveAdmin controller extension to persist resource index filters between requests.
# this stuff goes in config/initializers/active_admin.rb
ActiveAdmin.setup do |config|
# ...
# put these lines in the "Controller Filters" section of the ActiveAdmin.setup block
# These two are defined in ActiveAdmin::FilterSaver::Controller, which is loaded below.
config.before_filter :restore_search_filters