Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
game_server.name
Browse files Browse the repository at this point in the history
  • Loading branch information
jwang47 committed May 10, 2013
1 parent 397dddf commit cbea2b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/game_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class GameServer < ActiveRecord::Base
#validate :num_players_lt_max_players
validate :num_players_gte_zero

attr_accessible :name
attr_accessible :ip_address, :max_players
attr_accessible :started_at, :num_red_players, :num_blue_players

Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20130510224145_add_name_to_game_server.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddNameToGameServer < ActiveRecord::Migration
def change
add_column :game_servers, :name, :string
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20130503004022) do
ActiveRecord::Schema.define(:version => 20130510224145) do

create_table "friend_requests", :force => true do |t|
t.integer "requestor_id"
Expand All @@ -37,6 +37,7 @@
t.datetime "started_at"
t.integer "num_red_players", :default => 0
t.integer "num_blue_players", :default => 0
t.string "name"
end

create_table "game_session_user_stats", :force => true do |t|
Expand Down

0 comments on commit cbea2b2

Please sign in to comment.