require_dependency "blast/contacts/application_controller" module Blast module Admin class ContactsController < ApplicationController before_action :set_contact_count, only: :index def index authorize [:blast, :admin], :index? @contacts = Blast::Contacts::Contact.all end private def set_contact_count @users_count = policy_scope(Blast::User).count @contacts_count = Blast::Contacts::Contact.count if Blast::Core.available?(:tasks) @tasks_count = Blast::Tasks::Task.count end end end end end