Rails 3.1 asset pipeline: change default URL (/assets)
I would like to know if there is a way to change the default URL of the new asset pipeline location in Rails 3.1. - Default URL is /assets - I would like to change this to something like /static
My problem is that I already have an Asset model and it might interfere with the URL.
I know that there is a way to specify a different host for the assets (config.asset_host), but I'd rather prefer not to开发者_StackOverflow社区 resort to that.
Thanks!
In config/application.rb, below
config.assets.enabled = true
you can add :
config.assets.prefix = "static"
That's it :)
精彩评论