Sha256: 2b32f79264b76054d7a6a4150dfa72082097f016421e0860d1774a8b9f1a3285

Contents?: true

Size: 429 Bytes

Versions: 7

Compression:

Stored size: 429 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

      def check_organizations_presence
        return if Organization.exists?

        redirect_to new_organization_path
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-system-0.28.4 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.28.3 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.28.2 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.28.1 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.28.0 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.28.0.rc5 app/controllers/decidim/system/dashboard_controller.rb
decidim-system-0.28.0.rc4 app/controllers/decidim/system/dashboard_controller.rb