Activity timeline
January 2, 2010
Adam added Food Rules to his library.
Adam added Stumbling on Happiness to his library.
December 31, 2009
Note that this code uses %{...}. This is an alternative syntax for double-quoted string literals, convenient for use with long strings. Note also that because it uses Rails' create method, it will fail silently if records cannot be inserted because of validation errors.
December 28, 2009
"Nothing to do with our application comes out of the database or gets stored into the database that doesn't first go through the model. This makes models an ideal place to put validations; it doesn't matter whether the data comes from a form or from some programmatic manipulation in our application. If a model checks it before writing to the database, then the database will be protected from bad data."
December 19, 2009
In Rails, dynamic content is generated by templates, which come in three flavors. The most common templating scheme, called Embedded Ruby (ERb), embeds snippets of Ruby code within a view document.































