Bookmarker: Stage 2 ___________________ Congratulations! You now have a functioning web app that integrates with the database and allows you to create, edit, and delete basic bookmarks. But that was easy. Now comes the part where you have to write some Ruby! Obviously, a list of URLs is not very sexy, so we're going to do a few things. First, we're going to add a title, description, and date of creation field to our bookmarks. Next, we're going to add validations to the bookmark model to enforce basic rules like making sure the url is syntactically valid and that required fields aren't empty. Finally, we're going to use ERB to tweak the bookmark views so the list of bookmarks is a bit less generic looking. So let's get started. In order to add the fields to the database in a manner we can track and fix if we goof up, we need to create a migration. This can be performed by a ruby script from the command line: ruby script/generate migration add_bookmark_fields That will create a file "002_add_bookmark_fields.rb" in your db/migrate/ directory. Navigate there and open up the file. Once again you'll see a self.up and a self.down method just like the first migration. Now, you just need to figure out how to add three columns: title, description, and created_at. The title is a field type of :string, the description is type :text, and created_at is type :timestamp. In fact, created_at is a special field name that Rails understands will be auto- populated with the creation date and time. Remember to write code in self.down that rolls back the changes you make to the database in self.up! Once you finish, try your migration script out by running at the command prompt: rake db:migrate If you're successful, the fields are added! They should even show up automatically in the views - refresh the listing in the browser, for instance. Now open app/models/bookmark.rb to continue. *** END OF STAGE 2 INTRO ***