Module: RestrictCache::ActionControllerExt::ClassMethods

Defined in:
lib/restrict_cache/action_controller_ext.rb

Instance Method Summary collapse

Instance Method Details

#cache_sweep_action(*args) ⇒ Object



6
7
8
9
10
11
# File 'lib/restrict_cache/action_controller_ext.rb', line 6

def cache_sweep_action(*args)
  options = args.extract_options!
  actions = args.empty? ? {} : {only: args}
  options.merge! actions unless actions.empty?
  around_action :sweep_restrict_cache, options
end