Ayrad
Ayrad

Reputation: 4056

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.jsfile. 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?

Upvotes: 1

Views: 227

Answers (1)

Hoa.Nguyen
Hoa.Nguyen

Reputation: 117

The quick solution is trying to do a monkey patch for this file app/assets/javascripts/active_admin/base.es6 and add your Chartkick stuff.

Upvotes: 1

Related Questions