Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add person model
  • Loading branch information
Vanuan committed Jul 14, 2014
1 parent 4c64704 commit 14f16ea
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/person.rb
@@ -0,0 +1,2 @@
class Person < ActiveRecord::Base
end
11 changes: 11 additions & 0 deletions db/migrate/20140714115420_create_people.rb
@@ -0,0 +1,11 @@
class CreatePeople < ActiveRecord::Migration
def change
create_table :people do |t|
t.string :name
t.date :date_of_birth
t.string :place_of_birth

t.timestamps
end
end
end
24 changes: 24 additions & 0 deletions db/schema.rb
@@ -0,0 +1,24 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20140714115420) do

create_table "people", force: true do |t|
t.string "name"
t.date "date_of_birth"
t.string "place_of_birth"
t.datetime "created_at"
t.datetime "updated_at"
end

end
11 changes: 11 additions & 0 deletions test/fixtures/people.yml
@@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

one:
name: MyString
date_of_birth: 2014-07-14
place_of_birth: MyString

two:
name: MyString
date_of_birth: 2014-07-14
place_of_birth: MyString
7 changes: 7 additions & 0 deletions test/models/person_test.rb
@@ -0,0 +1,7 @@
require 'test_helper'

class PersonTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

0 comments on commit 14f16ea

Please sign in to comment.