jondavidjohn
jondavidjohn

Reputation: 62412

remove /assets/ path from asset_host config

I'm using a cdn for my precompiled assets, and it's working with this asset_host config...

config.action_controller.asset_host = "http://xxxxxx.xx.rackcdn.com"

and my asset paths are coming out

http://xxxxxx.xx.rackcdn.com/assets/application-xxxxxxxxx.css

When I need them to just be

http://xxxxxx.xx.rackcdn.com/application-xxxxxxxxx.css

What config value am i missing to remove the assets from the path?

Upvotes: 2

Views: 1255

Answers (1)

NARKOZ
NARKOZ

Reputation: 27961

You can change assets path by specifying
config.assets.prefix = '/other/path-prefix' in your config/application.rb or just for special environment in config/environments/<env>.rb.

To remove path completely set it to empty string:
config.assets.prefix = ''

Upvotes: 4

Related Questions