Class: Decidim::TermCustomizer::Admin::CachesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/decidim/term_customizer/admin/caches_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#permission_class_chain

Instance Method Details

#clearObject



13
14
15
16
17
18
19
20
# File 'app/controllers/decidim/term_customizer/admin/caches_controller.rb', line 13

def clear
  enforce_permission_to :update, :organization

  TermCustomizer.loader.clear_cache
  flash[:notice] = I18n.t("caches.clear.success", scope: "decidim.term_customizer.admin")

  redirect_to translation_sets_path
end

#indexObject



7
8
9
10
11
# File 'app/controllers/decidim/term_customizer/admin/caches_controller.rb', line 7

def index
  enforce_permission_to :update, :organization

  redirect_to translation_sets_path
end