railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.87k stars 2.25k forks source link

including javascript file for theming plugin #2249

Open fridgerator opened 9 years ago

fridgerator commented 9 years ago

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

kelynch commented 8 years ago

Has there been some resolution to this? I'm experiencing the same problem in my custom theme as well.