简体   繁体   中英

integrate Chartkick with a rails 5.2 api only app?

When integrating the chartkick gem in my rails api-only app, the documentation states that the js needs to be improted like this in the application.js file. The app being an api-only app doesn't have an application.js file.

//= require Chart.bundle
//= require chartkick

How do I require chartkick for use with activeadmin without an application.js file?

快速解决方案是尝试为此文件app/assets/javascripts/active_admin/base.es6做一个猴子补丁,并添加您的Chartkick内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM