dashing-rails
dashing-rails copied to clipboard
Widgets raise errors when setting Dashing.engine_path to application root
Changed engine_path to '/' and the widgets disappeared and raised errors on their requests. Apparently they are still requesting '/dashing/widgets' instead of '/widgets'. Tried with 2.3.1 and it still failed.
You can customize widgets paths here https://github.com/gottfrois/dashing-rails/blob/master/lib/dashing/configuration.rb#L39
This looks like filepath configurations. Will this change the route that are being requested by the widgets?
widgets path and routes path are different. Look here https://github.com/gottfrois/dashing-rails/blob/master/app/controllers/dashing/widgets_controller.rb I have not tried what you are trying to do. Will do
Looked at your issue, it's because the path are hard coded in the JS files:
https://github.com/gottfrois/dashing-rails/blob/4951c4258aa5c38831f8c01c492c6e20778bfc93/vendor/assets/javascripts/dashing/dashing-src.coffee#L2 https://github.com/gottfrois/dashing-rails/blob/4951c4258aa5c38831f8c01c492c6e20778bfc93/vendor/assets/javascripts/dashing/dashing-src.coffee#L97
I've tried to use Dashing.config.engine_path
here but for some reason it's always taking the default engine_path which is /dashing
.