puppetlabs/Razor — pull request #179 by tjmcs (2012-08-17 22:37:44+00:00)
Title: Fixes issues that arose when trying to update the model meta-data via the web

Found an issue associated with attempts to update the meta-data associated with a model using the web-based interface. This issue results from the fact that there are three parameters associated with the meta-data values in our current Models that are referenced differently in the Model instances than they are in the Model Templates that are used to construct those Model instances (they are referenced using the String keys "validation", "default", and "required" in a Model instance but are referenced using the Symbol keys :validation, :default, and :required in a Model Template instance). This patch will look for the Symbol keys first, then the String keys, so it should work for both model creation, where these values are obtained from the Model Template that is being used to create the new Model instance (and their keys appear as Symbols), and updates to the meta-data for an existing Model instance (where these same keys appear as Strings)