External data file for a model

Ryan Glover wrote:

I have a number of models that each require some static key/value pairs to perform calculations. I envision an external file for each model named the same as the model that the model can open and parse when needed.

I liken this external file to the .plist files that apple apps have.

Q1. Does this make sense? Is there an easy way to do this?

Q2. Does Rails have a .plist equivalent or something similar?

Q3. Does Rails have built in parsing functionality that can make this easy (say xml or yaml)?

YAML works great and Rails uses it for stuff like your database.yml config file.

You can just do something like:

filedata = YAML::load_file(path_to_file)