app/controllers/decidim/system/dashboard_controller.rb in decidim-system-0.24.3 vs app/controllers/decidim/system/dashboard_controller.rb in decidim-system-0.25.0.rc1
- old
+ new
@@ -1,8 +1,19 @@
# frozen_string_literal: true
module Decidim
module System
class DashboardController < Decidim::System::ApplicationController
+ before_action :check_organizations_presence
+
+ def show
+ @organizations = Organization.all
+ end
+
+ def check_organizations_presence
+ return if Organization.exists?
+
+ redirect_to new_organization_path
+ end
end
end
end