Alex Ivasyuv
Alex Ivasyuv

Reputation: 8844

Ruby on Rails map static resources

I need to map static resources, that are located under the my_assets folder and contain a lot of different static files (css/js/html/images/json/etc...) under /my_asset/any_path....

I don't need any templates and so on... Just serve them as they are under some prefix url.

How I can do it?

Thanks in advance!

Upvotes: 0

Views: 76

Answers (1)

zwippie
zwippie

Reputation: 15515

If you put your assets in the public folder they will be served as static assets.

Even better is to put your static assets on a CDN so your webserver won't get hit for all those requests for static files.

Upvotes: 2

Related Questions