public
Fork of vigetlabs/tyrant
Description: Manage multiple Rails applications from one
Homepage: http://rubyforge.org/projects/tyrant
Clone URL: git://github.com/reagent/tyrant.git
Search Repo:
Start of Account model
reagent (author)
Mon May 05 11:49:14 -0700 2008
commit  6936ad0f074e812fb5336f2e60992589e5048639
tree    193dd398478e4e19d1de37e9028d7afea4e42673
parent  150450e6f2035d4852bd0baf33201d74a92ecec8
...
 
 
...
1
2
0
@@ -1 +1,3 @@
0
+class Account < ActiveRecord::Base
0
+end
...
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
0
@@ -1 +1,14 @@
0
+class CreateAccounts < ActiveRecord::Migration
0
+ def self.up
0
+ create_table :accounts do |t|
0
+ t.string :username, :length => 64, :null => false
0
+ t.boolean :admin, :null => false
0
+ t.datetime :created_at, :updated_at, :null => false
0
+ end
0
+ end
0
+
0
+ def self.down
0
+ drop_table :accounts
0
+ end
0
+end
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
0
@@ -1 +1,22 @@
0
+# This file is auto-generated from the current state of the database. Instead of editing this file,
0
+# please use the migrations feature of ActiveRecord to incrementally modify your database, and
0
+# then regenerate this schema definition.
0
+#
0
+# Note that this schema.rb definition is the authoritative source for your database schema. If you need
0
+# to create the application database on another system, you should be using db:schema:load, not running
0
+# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
0
+# you'll amass, the slower it'll run and the greater likelihood for issues).
0
+#
0
+# It's strongly recommended to check this file into your version control system.
0
+
0
+ActiveRecord::Schema.define(:version => 20080424031414) do
0
+
0
+ create_table "accounts", :force => true do |t|
0
+ t.string "username", :null => false
0
+ t.boolean "admin", :null => false
0
+ t.datetime "created_at", :null => false
0
+ t.datetime "updated_at", :null => false
0
+ end
0
+
0
+end
...
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
0
@@ -1 +1,10 @@
0
+require File.dirname(__FILE__) + '/../test_helper'
0
+
0
+describe "Account", ActiveSupport::TestCase do
0
+
0
+ it "should exist (dummy test)" do
0
+ Account.should.be.kind_of(Class)
0
+ end
0
+
0
+end

Comments

    No one has commented yet.