Permalink
Browse files

Generating model and migration for state change

  • Loading branch information...
1 parent 2050694 commit 6588f305d6f4c1685a6a8a30434c72787c2fe689 @pat pat committed Sep 29, 2008
View
@@ -0,0 +1,2 @@
+class State < ActiveRecord::Base
+end
@@ -0,0 +1,13 @@
+class CreateStates < ActiveRecord::Migration
+ def self.up
+ create_table :states do |t|
+ t.string :name
+
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :states
+ end
+end
@@ -0,0 +1,7 @@
+class SwitchStates < ActiveRecord::Migration
+ def self.up
+ end
+
+ def self.down
+ end
+end
@@ -0,0 +1,7 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+one:
+ name: MyString
+
+two:
+ name: MyString
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class StateTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end

0 comments on commit 6588f30

Please sign in to comment.