internationalization - ActiveAdmin with I8n.js in Rails -
i'm developing rails app activeadmin , i'm using i18n.js js translations.
the problem i8n.js work have set language in every .erb
so:
<script type="text/javascript"> i18n.defaultlocale = "<%= i18n.default_locale %>"; i18n.locale = "<%= i18n.locale %>"; </script>
witch works fine in rest of app (if place in application.erb
file) can't find global place put can shared across activeadmin forms.
i don't want repeat code in every form or modify default activeadmin erb
(if possible).
so there way share erb code across views?
thanks!
there 2 ways, think: 1. put code layout views 2. put code separate partial , render in each view (providing there problems layouts)
Comments
Post a Comment