module ActiveAdmin::OptionalDisplay

Shareable module to give a display_on?(action) method which returns true or false depending on an options hash.

The options hash accepts:

only: :index only: [:index, :show] except: :index except: [:index, :show]

call normalize_display_options! after @options has been set to ensure that the display options are setup correctly