fix: use data: { mode: 'json' } instead of hash rocket syntax

Rails form helpers translate data: { mode: 'json' } to data-mode="json".
The hash rocket 'data-mode' => 'json' may not generate the attribute
correctly in Slim context.
This commit is contained in:
BenClaw
2026-05-30 21:21:14 +02:00
parent f54bfb63db
commit 00be67de45
+1 -1
View File
@@ -41,7 +41,7 @@ javascript:
.field
= f.label :page_settings
p.help-text JSON configuration for this page. Use Ace editor in JSON mode.
= f.text_area :page_settings, rows: 12, cols: 80, class: 'html-content', 'data-mode' => 'json',
= f.text_area :page_settings, rows: 12, cols: 80, class: 'html-content', data: { mode: 'json' },
value: (f.object.page_settings.presence || {}).to_json
.form-row
.form-label= f.label :parent_id