Sha256: a1b38c08c9c47dbb4749c38fe855c948001d08f1e3df82b150d210cc1741c573

Contents?: true

Size: 444 Bytes

Versions: 6

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module System
    class DashboardController < Decidim::System::ApplicationController
      before_action :check_organizations_presence

      def show
        @organizations = Organization.all
        @admins = Admin.all
      end

      private

      def check_organizations_presence
        return if Organization.exists?

        redirect_to new_organization_path
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-system-0.29.1 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.29.0 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.29.0.rc4 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.29.0.rc3 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.29.0.rc2 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.29.0.rc1 app/controllers/decidim/system/dashboard_controller.rb