Added Maps model

refs #16

This model will be used for storing information about each map
This commit is contained in:
2012-04-25 12:39:44 -04:00
parent 3a37b3f0d1
commit 2b34516aa8
4 changed files with 37 additions and 0 deletions

3
app/models/map.rb Normal file
View File

@@ -0,0 +1,3 @@
class Map < ActiveRecord::Base
unloadable
end

View File

@@ -0,0 +1,13 @@
class CreateMaps < ActiveRecord::Migration
def self.up
create_table :maps do |t|
t.column :package, :string
t.column :build, :string
t.column :map, :string
end
end
def self.down
drop_table :maps
end
end

11
test/fixtures/maps.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
id: 1
package: MyString
build: MyString
map: MyString
two:
id: 2
package: MyString
build: MyString
map: MyString

10
test/unit/map_test.rb Normal file
View File

@@ -0,0 +1,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class MapTest < ActiveSupport::TestCase
fixtures :maps
# Replace this with your real tests.
def test_truth
assert true
end
end