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

Add application controller to preview to allow dynamic controllers

Oliver Günther64691ffb6d79
diff --git a/app/views/layouts/component_preview.html.erb b/app/views/layouts/component_preview.html.erb
index dbbd47468e6..0174edef64d 100644
--- a/app/views/layouts/component_preview.html.erb
+++ b/app/views/layouts/component_preview.html.erb
@@ -38,6 +38,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= content_tag :body,
class: 'viewcomponent-preview',
+ data: { controller: "application" },
style: styles.join(";") do %>
<section class="viewcomponent-preview--content">
<%= yield %>