chapter 3 rails