Monthly archives: February, 2010

Autoloading Classes when Deserializing YAML Objects (or, What Is This YAML::Object?)

Rails will automatically load Ruby files from your /app, /lib, and other directories when you use the appropriately named constant. For example, if you use the name RailsExampleObject in your code, Rails will automatically look for a file called rails_example_object.rb and load it. However, this autoloading of classes fails when deserializing objects from YAML. This …