开发者

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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜