The Art of Rails Example Code The Art of Rails places a great deal of emphasis on small code examples that are tightly woven with the text, so it does not have a great deal of large stand-alone code examples. Still, several discussions in the book involve code that you will probably want to re-type into the computer while reading to better understand and experiment with it. This code package attempts to collect those pieces of code for you so that you do not have to re-type it. Comments in the code provide a bit of narration of what is going on, and in all examples the book will provide a full discussion of the ideas being demonstrated. If you have any questions about the code, feel free to leave a comment at http://www.artofrails.com and I will reply as promptly as possible. Sincerely, Edward Benson Example Code Contents, By Chapter - Chapter 1 (No Code) - Chapter 2 (No Code) - Chapter 3 (No Code) - Chapter 4 (No Code) + Chapter 5 * Example code for API metering - Chapter 6 (No Code) - Chapter 7 (No Code) + Chapter 8 * Example code for Method, Proc, and Block differences + Chapter 9 * Mixin examples * Monkey Patching + Chapter 10 * Code-writing macros * method_missing usage * Reflection Note that there is a bug in Chapter 10 of the book itself. The following example code appears in the section "Procs" under the Section "Comparing Methods, Procs, and Blocks": def purchase_random_food_dispenser foods = %w(carrots potatoes fish bread) lambda { foods[rand(foods.size)] } end The first line of that example is wrong. Instead it should be def purchase_ready_made_food + Chapter 11 * Example Code for seeding data sets - Chapter 12 (No Code)