diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-10-14 20:44:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 20:44:59 +0200 |
commit | 07341e7aa60fe7c7d4f298136af99276820940e7 (patch) | |
tree | 0244c21262573d6a94868f8ce7dfa934fabccf1e /app/helpers | |
parent | 959f7fc580050b37741c92b645b842e45017a010 (diff) |
Add graphs and retention metrics to admin dashboard (#16829)
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a39e8e5bf..34fc46615 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 << "theme-#{current_theme.parameterize}" |