dimanche 1 avril 2018

Rails4 - How to add custom data attributes to body tag in ActiveAdmin

I am using activeadmin gem in my Rails4 app and just wondering how i can add custom attributes on my body tag or custom meta tag in my markup.There are few approaches :-

  1. Override the layout and easily define helper/function to get the meta tag/body custom attributes.
  2. Keep the default settings, just include custom js file in initializers/active_admin.js and let the js make an ajax call and make changes in the body tag and add some attributes.
  3. Is there any other way..an easy one?

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire