Following the two theming examples (example and flatly), both have empty .js files located in ./vendor/assets/javascripts/themes/{theme_name}/ui.js.
In my project, when I include javascript in this file it does not get included in the project. I noticed the rails_admin.scss.erb file is getting the theme name from the ENV variable and then using that to include the correct directories whereas the rails_admin.js file is not doing that.
Currently my project has the ui.coffee file in ./vendor/assets/javascripts/rails_admin/custom/ directory which works fine until the project using the theming gem overrides that file, which for me happens quite often.
What is the correct way to include custom javascript for a custom theme?
link to my rails_admin theme project
Following the two theming examples (example and flatly), both have empty
.js
files located in./vendor/assets/javascripts/themes/{theme_name}/ui.js
.In my project, when I include javascript in this file it does not get included in the project. I noticed the
rails_admin.scss.erb
file is getting the theme name from the ENV variable and then using that to include the correct directories whereas therails_admin.js
file is not doing that.Currently my project has the
ui.coffee
file in./vendor/assets/javascripts/rails_admin/custom/
directory which works fine until the project using the theming gem overrides that file, which for me happens quite often.What is the correct way to include custom javascript for a custom theme?