Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 resort to that.

Thanks!

like image 548
Jorik Hanssen Avatar asked Dec 28 '22 19:12

Jorik Hanssen


1 Answers

In config/application.rb, below

config.assets.enabled = true

you can add :

config.assets.prefix = "static"

That's it :)

like image 67
Clément Avatar answered Jan 11 '23 13:01

Clément