1
0
Fork 0

Add model Account

This commit is contained in:
Alex Kotov 2018-12-02 07:03:19 +05:00
parent 0efd5160a1
commit 0c724db429
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/account.rb Normal file
View File

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

View File

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

View File

@ -10,11 +10,16 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2018_12_01_184444) do
ActiveRecord::Schema.define(version: 2018_12_02_020031) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "accounts", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false

6
factories/accounts.rb Normal file
View File

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

View File

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