Generate code based on Railscasts episodes