Sha256: b7405fc6d2bb3f2ba6387bd2f1729da0d36ba3f437f08a3063bf893773813dd8

Contents?: true

Size: 483 Bytes

Versions: 10

Compression:

Stored size: 483 Bytes

Contents

class Backend::SearchTermsController < Backend::BaseController
  before_action -> { breadcrumb.add t('b.search_terms'), backend_search_terms_path }

  def index
    @search_terms = ::SearchTerm.select('*, COUNT(1) as total')
                                .group('locale, term')
                                .order('COUNT(1) DESC')
  end

  def destroy_all
    ::SearchTerm.destroy_all
    redirect_to backend_search_terms_path, notice: t('b.msg.search_terms.deleted')
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
udongo-7.9.0 app/controllers/backend/search_terms_controller.rb
udongo-7.8.1 app/controllers/backend/search_terms_controller.rb
udongo-7.8.0 app/controllers/backend/search_terms_controller.rb
udongo-7.7.2 app/controllers/backend/search_terms_controller.rb
udongo-7.7.1 app/controllers/backend/search_terms_controller.rb
udongo-7.7.0 app/controllers/backend/search_terms_controller.rb
udongo-7.6.2 app/controllers/backend/search_terms_controller.rb
udongo-7.6.1 app/controllers/backend/search_terms_controller.rb
udongo-7.6.0 app/controllers/backend/search_terms_controller.rb
udongo-7.5.1 app/controllers/backend/search_terms_controller.rb