Changeset 60


Ignore:
Timestamp:
May 21, 2008, 10:02:39 PM (16 years ago)
Author:
KOBAYASHI, Shinji
Message:

add people scaffold

Location:
ruby/trunk/rails/cancerehr
Files:
16 added
4 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/rails/cancerehr/config/routes.rb

    r12 r60  
    11ActionController::Routing::Routes.draw do |map|
     2  map.resources :people
     3
     4
     5  map.resources :people
     6
    27  # The priority is based upon order of creation: first created -> highest priority.
    38
  • ruby/trunk/rails/cancerehr/db/migrate/001_create_users.rb

    r59 r60  
    11class CreateUsers < ActiveRecord::Migration
    22  def self.up
     3    options = {
     4      :options => "DEFAULT_CHAR_SET=utf8"
     5    }
    36    create_table :users do |t|
    47      t.column :name, :string
  • ruby/trunk/rails/cancerehr/db/schema.rb

    r57 r60  
    1010# It's strongly recommended to check this file into your version control system.
    1111
    12 ActiveRecord::Schema.define(:version => 1) do
     12ActiveRecord::Schema.define(:version => 2) do
     13
     14  create_table "people", :force => true do |t|
     15    t.string   "name"
     16    t.date     "birthday"
     17    t.string   "sex"
     18    t.datetime "created_at"
     19    t.datetime "updated_at"
     20  end
    1321
    1422  create_table "users", :force => true do |t|
  • ruby/trunk/rails/cancerehr/log/test.log

    r12 r60  
     1  [4;36;1mSQL (0.000351)[0m   [0;1mSELECT count(*) AS count_all FROM people [0m
     2
     3
     4Processing PeopleController#create (for 0.0.0.0 at 2008-05-20 22:42:40) [POST]
     5  Session ID:
     6  Parameters: {"action"=>"create", "controller"=>"people", "person"=>{}}
     7  [4;35;1mPerson Create (0.000462)[0m   [0mINSERT INTO people ("name", "updated_at", "birthday", "created_at") VALUES(NULL, '2008-05-20 22:42:40', NULL, '2008-05-20 22:42:40')[0m
     8Redirected to http://test.host/people/1
     9Completed in 0.00810 (123 reqs/sec) | DB: 0.00081 (10%) | 302 Found [http://test.host/people?]
     10  [4;36;1mSQL (0.000310)[0m   [0;1mSELECT count(*) AS count_all FROM people [0m
     11  [4;35;1mSQL (0.000315)[0m   [0mSELECT count(*) AS count_all FROM people [0m
     12
     13
     14Processing PeopleController#index (for 0.0.0.0 at 2008-05-20 22:42:40) [GET]
     15  Session ID:
     16  Parameters: {"action"=>"index", "controller"=>"people"}
     17  [4;36;1mPerson Load (0.000259)[0m   [0;1mSELECT * FROM people [0m
     18Rendering template within layouts/people
     19Rendering people/index
     20Completed in 0.00503 (198 reqs/sec) | Rendering: 0.00406 (80%) | DB: 0.00088 (17%) | 200 OK [http://test.host/people]
     21
     22
     23Processing PeopleController#new (for 0.0.0.0 at 2008-05-20 22:42:40) [GET]
     24  Session ID:
     25  Parameters: {"action"=>"new", "controller"=>"people"}
     26Rendering template within layouts/people
     27Rendering people/new
     28Completed in 0.00329 (303 reqs/sec) | Rendering: 0.00279 (84%) | DB: 0.00000 (0%) | 200 OK [http://test.host/people/new]
Note: See TracChangeset for help on using the changeset viewer.