Please sign in to comment.
Create blog posts table
We fix the model test error by creating the `blog_posts` table. Inner green; outer red: undefined method `title' for #<BlogPost id: nil> Now the `BlogPost` can be instantiated, so the model test passes. We step back up to the acceptance test level and rerun it, and it's gotten past that error. The next acceptance test error occurs when Rails attempts to render the form. The form helper tries to get the current value of the `title` field on the model, but there is no `title` method to retrieve it. Since we want `title` to be a database-persisted field on our model, the problem is that there is no `title` column in our database table.
- Loading branch information...
Showing with 10 additions and 2 deletions.
|@@ -0,0 +1,6 @@|
|class CreateBlogPosts < ActiveRecord::Migration[5.1]|
|create_table :blog_posts do |t||