zeroclipboard / zeroclipboard-rails

ZeroClipboard rails gem
http://zeroclipboard.org/
MIT License
125 stars 36 forks source link

Use image_url instead of image_path in asset-path.js.erb #31

Open yukas opened 9 years ago

yukas commented 9 years ago

In our Rails app we have asset host different than the app host.

In Rails asset host can be configured for each environment as such:

config.action_controller.asset_host = "http://assets.someapp.com"

If we use image_path to generate swf url, we will have output like this: "http://www.someapp.com/assets/ZeroClipboard.swf".

What should be is url like this: "http://assets.someapp.com/assets/ZeroClipboard.swf".

If we use image_url instead, it will solve the problem.