File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ class ApplicationController < ActionController::Base
10
10
helper Lookbook ::ApplicationHelper
11
11
helper Lookbook ::UiElementsHelper
12
12
13
+ before_action :disable_annotations
14
+ after_action :restore_annotations
15
+
13
16
before_action :assign_theme_overrides
14
17
before_action :assign_instance_vars
15
18
@@ -37,6 +40,20 @@ def not_found
37
40
38
41
protected
39
42
43
+ def disable_annotations
44
+ return unless ActionView ::Base . respond_to? ( :annotate_rendered_view_with_filenames )
45
+
46
+ @original_annotations_value = ActionView ::Base . annotate_rendered_view_with_filenames
47
+ ActionView ::Base . annotate_rendered_view_with_filenames = false
48
+ end
49
+
50
+ def restore_annotations
51
+ return if @original_annotations_value . nil?
52
+
53
+ ActionView ::Base . annotate_rendered_view_with_filenames = @original_annotations_value
54
+ @original_annotations_value = nil
55
+ end
56
+
40
57
def assign_theme_overrides
41
58
@theme_overrides ||= Engine . theme . to_css
42
59
end
You can’t perform that action at this time.
0 commit comments