newUserNameHere
newUserNameHere

Reputation: 17971

How to reprioritize config.assets.paths in rails

You can do for instance:

config.assets.paths << "#{Rails.root}/some_directory_here"

To add an asset path, however this puts it at the bottom.

Is there a way to add to the top or to change the order of the paths?

Some of the gems I'm using are adding their own paths and I would like to be able to override or mask their assets.

Upvotes: 0

Views: 152

Answers (1)

Incerteza
Incerteza

Reputation: 34884

Try to add on the top:

config.assets.paths.unshift("#{Rails.root}/some_directory_here")

Upvotes: 1

Related Questions