From 1278f388142b5e8e3a62cc417253d4b2d9d9b9b7 Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Thu, 9 Apr 2015 05:23:42 -0700 Subject: [PATCH] Add status string attribute to games --- app/views/games/show.html.haml | 2 +- db/migrate/20150409113625_add_status_to_games.rb | 5 +++++ db/schema.rb | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20150409113625_add_status_to_games.rb diff --git a/app/views/games/show.html.haml b/app/views/games/show.html.haml index 887c95a3..40b692a5 100644 --- a/app/views/games/show.html.haml +++ b/app/views/games/show.html.haml @@ -1,6 +1,6 @@ %p %b Status: - = @status + = @game.status %p %b Title: diff --git a/db/migrate/20150409113625_add_status_to_games.rb b/db/migrate/20150409113625_add_status_to_games.rb new file mode 100644 index 00000000..247d499d --- /dev/null +++ b/db/migrate/20150409113625_add_status_to_games.rb @@ -0,0 +1,5 @@ +class AddStatusToGames < ActiveRecord::Migration + def change + add_column :games, :status, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 366b7519..f1f26284 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -20,6 +20,7 @@ ActiveRecord::Schema.define(version: 20150104203850) do t.string "title" t.datetime "created_at" t.datetime "updated_at" + t.string "status" end create_table "player_cards", force: true do |t|