1
0
Fork 0

Add model Person

This commit is contained in:
Alex Kotov 2018-12-10 08:32:35 +05:00
parent b00b838555
commit 7252a6d021
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
5 changed files with 34 additions and 1 deletions

4
app/models/person.rb Normal file
View File

@ -0,0 +1,4 @@
# frozen_string_literal: true
class Person < ApplicationRecord
end

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
class CreatePeople < ActiveRecord::Migration[5.2]
def change
create_table :people do |t|
t.timestamps null: false
end
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2018_12_10_024922) do
ActiveRecord::Schema.define(version: 2018_12_10_033105) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -112,6 +112,11 @@ ActiveRecord::Schema.define(version: 2018_12_10_024922) do
t.boolean "confirmed", default: false, null: false
end
create_table "people", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "regional_offices", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false

6
factories/people.rb Normal file
View File

@ -0,0 +1,6 @@
# frozen_string_literal: true
FactoryBot.define do
factory :person do
end
end

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Person do
subject { create :person }
pending "add some examples to (or delete) #{__FILE__}"
end