OiO.lk Blog javascript Rails Admin UI Not Working Properly with Custom JS
javascript

Rails Admin UI Not Working Properly with Custom JS


I recently added a custom action that requires some custom JavaScript. To do so I added app/assets/javascripts/rails_admin/ui.js

//= require ../google_places_autocomplete.js
//= require ../google_places_autocomplete_validation.js

My custom action works correctly, but when I go to my form to create a new instance the UI is not correct. There are no console errors. My custom CK Editor doesn’t show on the content field, the date picker doesn’t work, and the Author drop down is displayed differently.

If I remove my custom file at app/assets/javascripts/rails_admin/ui.js everything works as expected (except for my custom action, of course).

Why is adding the ui.js file causing this, and how can I get around it?



You need to sign in to view this answers

Exit mobile version