dashing-rails icon indicating copy to clipboard operation
dashing-rails copied to clipboard

Widgets raise errors when setting Dashing.engine_path to application root

Open adimasuhid opened this issue 10 years ago • 4 comments

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.

adimasuhid avatar May 15 '14 07:05 adimasuhid

You can customize widgets paths here https://github.com/gottfrois/dashing-rails/blob/master/lib/dashing/configuration.rb#L39

gottfrois avatar May 15 '14 08:05 gottfrois

This looks like filepath configurations. Will this change the route that are being requested by the widgets?

adimasuhid avatar May 15 '14 09:05 adimasuhid

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

gottfrois avatar May 15 '14 09:05 gottfrois

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.

gottfrois avatar Nov 07 '14 14:11 gottfrois