zeroclipboard-rails
zeroclipboard-rails copied to clipboard
Use image_url instead of image_path in asset-path.js.erb
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.