about summary refs log tree commit diff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-10-14 22:57:41 +0200
committerGitHub <noreply@github.com>2021-10-14 22:57:41 +0200
commitb6f24ef0fb8b594c38c29090518c21af051b63b7 (patch)
tree5cec6a6b13dfd062848c74ae8e041c589ae40d00 /app/helpers/application_helper.rb
parentebf2c3195615bb524f6908e84f99887c8775cbc3 (diff)
parent6964952d5f242ca936de9df361185b3e70a99ca4 (diff)
Merge pull request #1622 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cc622478d..3fbc418cb 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -137,6 +137,10 @@ module ApplicationHelper
     end
   end
 
+  def react_admin_component(name, props = {})
+    content_tag(:div, nil, data: { 'admin-component': name.to_s.camelcase, props: Oj.dump({ locale: I18n.locale }.merge(props)) })
+  end
+
   def body_classes
     output = (@body_classes || '').split(' ')
     output << "flavour-#{current_flavour.parameterize}"