Skip to content

Commit

Permalink
The intial model of the user
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmounir committed Mar 3, 2017
1 parent 68ab8bd commit 6b0663a
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class User < ApplicationRecord
end
13 changes: 13 additions & 0 deletions db/migrate/20170303183523_create_users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class CreateUsers < ActiveRecord::Migration[5.0]
def change
create_table :users do |t|
t.string :first_name
t.string :last_name
t.string :email
t.string :email
t.boolean :verified

t.timestamps
end
end
end
24 changes: 24 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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: 20170303183523) do

create_table "users", force: :cascade do |t|
t.string "first_name"
t.string "last_name"
t.string "email"
t.boolean "verified"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

end
15 changes: 15 additions & 0 deletions test/fixtures/users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

one:
first_name: MyString
last_name: MyString
email: MyString
email: MyString
verified: false

two:
first_name: MyString
last_name: MyString
email: MyString
email: MyString
verified: false
7 changes: 7 additions & 0 deletions test/models/user_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'test_helper'

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

0 comments on commit 6b0663a

Please sign in to comment.