Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix rubocop errors

Behrokh Satarnejad63c069ad6db3
diff --git a/app/components/admin/design_header_component.rb b/app/components/admin/design_header_component.rb
index 6519b8693b4..bbcf0c56f06 100644
--- a/app/components/admin/design_header_component.rb
+++ b/app/components/admin/design_header_component.rb
@@ -31,7 +31,9 @@
module Admin
class DesignHeaderComponent < ApplicationComponent
def initialize(title:, selected:)
+ super
raise "selected must 1, 2 or 3" if [1, 2, 3].exclude?(selected)
+
@title = title
@selected = selected
end
diff --git a/app/controllers/custom_styles_controller.rb b/app/controllers/custom_styles_controller.rb
index 23c3077585b..704f8186ff1 100644
--- a/app/controllers/custom_styles_controller.rb
+++ b/app/controllers/custom_styles_controller.rb
@@ -160,7 +160,6 @@ class CustomStylesController < ApplicationController
call.on_failure do
flash[:error] = call.message
end
-
redirect_back(fallback_location: root_path)
end