Hey there! Join Readernaut.

Readernaut is a free service that lets you write reviews, keep notes, make reading lists, track your reading progress and find your friends.

Join now!

Activity timeline

January 5, 2010

January 1, 2010

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."

Adam added Flatland to his library.

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.