Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails - where to put data files?

I wonder where to put data files (for example XML) to be loaded internally by Rails? Is there some standard location? Now I hold the file in "public" folder.

like image 512
Paul Avatar asked Mar 27 '12 11:03

Paul


2 Answers

I think that depends on which kind of data you have in your files. If the files are supposed to be loaded at startup, perhaps the config folder would be good. If they are needed for some backend processing, lib could be the place. Or just create a data folder.

There's a table at the end of section 3.2 here with the default folders and their intended purpose.

like image 96
Jakob W Avatar answered Nov 20 '22 08:11

Jakob W


The public folder is for public content.

You can create a folder "data" at the root of your app without any problem.

like image 39
Vodun Avatar answered Nov 20 '22 06:11

Vodun