You can also set CarrierWave’s asset_host
configĀ setting like this:
# config/initializers/carrierwave.rb
CarrierWave.configure do |config|
config.storage = :file
config.asset_host = ActionController::Base.asset_host
end
This ^ tells CarrierWave to use your app’s config.action_controller.asset_host
setting, which can be defined in one of your config/envrionments/[environment].rb
files. See here for more info.
Or set it explicitly:
config.asset_host="http://example.com"
Restart your app, and you’re good to go – no helper methods required.
* I’m using Rails 3.2 and CarrierWave 0.7.1