examples from Michael Hartl's Rails tutorial