Skip to content
Permalink
Browse files

Add columns to blog posts

We create a new migration to add the title and body column to the blog posts table.

Inner green; outer red: The action 'create' could not be found for BlogPostsController

With this, the model test passes, so we step back up to the acceptance test level and rerun it. The acceptance test moves on to the next error: the form is rendered, the fields are populated, it submits the form, but Rails doesn't find a `create` action on the controller to submit it to.
  • Loading branch information...
CodingItWrong committed Jun 14, 2016
1 parent ebca7c3 commit ca241c13493d5d7b242163b898684cf07c96d81e
Showing with 8 additions and 0 deletions.
  1. +6 −0 db/migrate/20160614163119_add_title_and_body_to_blog_posts.rb
  2. +2 −0 db/schema.rb
@@ -0,0 +1,6 @@
class AddTitleAndBodyToBlogPosts < ActiveRecord::Migration[5.1]
def change
add_column :blog_posts, :title, :string, null: false
add_column :blog_posts, :body, :text, null: false
end
end
@@ -16,6 +16,8 @@
enable_extension "plpgsql"

create_table "blog_posts", force: :cascade do |t|
t.string "title", null: false
t.text "body", null: false
end

end

0 comments on commit ca241c1

Please sign in to comment.
You can’t perform that action at this time.